Interface ILoggerSource
An object that writes its own log records under its own name and level. Sources form a tree through
ParentLoggerSource: a source with Inherit uses the level of the nearest ancestor
that sets one. Write records with the LoggerHelper extension methods such as this.LogInfo(...).
public interface ILoggerSource
- Extension Methods
Properties
ChildLoggerSources
The child sources. Use it to add or remove a child only: Utils.Common.Logging.BaseLoggerSource creates the collection on the first access to this property, so reading it allocates a collection for every source that has no children. To read or walk the children use GetChildLoggerSourcesCache(ILoggerSource), which returns a snapshot without creating anything and tolerates the implementations that return null here.
ICachedCollection<ILoggerSource> ChildLoggerSources { get; }
Property Value
LoggerId
The identifier that matches the source with its saved Utils.Common.Logging.LoggerSourceSettings.
Guid LoggerId { get; set; }
Property Value
- Guid
LoggerName
The name shown as the source of the log records.
string LoggerName { get; set; }
Property Value
- string
LoggingLevel
The minimum level of the records the source writes; Inherit takes the level of the parent.
LoggingLevel LoggingLevel { get; set; }
Property Value
ParentLoggerSource
The parent source in the logger tree, or null for a root source.
ILoggerSource? ParentLoggerSource { get; set; }
Property Value
Events
LoggerSettingsChanged
Raised when the name or the level of the source changes; the cached log4net logger of the source is rebuilt on it.
Added in ATAS 8.0.15.
event Action? LoggerSettingsChanged
Event Type
- Action