Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

LogManager Class

This class is used by client applications to request logger instances.

For a list of all members of this type, see LogManager Members.

System.Object
���log4net.LogManager

[Visual�Basic]
NotInheritable�Public�Class�LogManager
[C#]
public�sealed�class�LogManager

Thread Safety

This type is safe for multithreaded operations.

Remarks

This class has static methods that are used by a client to request a logger instance. The GetLogger method is used to retrieve a logger.

See the ILog interface for more details.

Example

Simple example of logging messages

[C#]
ILog log = LogManager.GetLogger("application-log");

log.Info("Application Start");
log.Debug("This is a debug message");

if (log.IsDebugEnabled)
{
    log.Debug("This is another debug message");
}

Requirements

Namespace: log4net

Assembly: log4net (in log4net.dll)

See Also

LogManager Members | log4net Namespace | ILog