Table of Contents

Namespace Utils.Common.Logging

Classes

LoggerHelper

Extension methods that write log records through log4net. The records go to the appenders configured by Utils.Common.Logging.Logger (the log files) and to the Utils.Common.Logging.ILoggerListener instances added to it. For an ILoggerSource sender the record is written under the source's LoggerName and discarded when its level is below the effective level of the source (see GetLoggingLevel(ILoggerSource)). For any other sender it is written under the full name of the sender's type (or under the string itself when the sender is a string) with the Info level, so Debug records of such senders are discarded. Format strings use string.Format(string, params object[]) placeholders. The log4net logger is cached per sender and released when the sender is garbage collected.

Interfaces

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(...).

Enums

LoggingLevel

The minimum severity of the messages a logger source writes; messages of a lower level are discarded.