Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

ILogExtensions Class

The static class ILogExtensions contains a set of widely used methods that ease the interaction with the ILog interface implementations.

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

System.Object
���log4net.Util.ILogExtensions

[Visual�Basic]
MustInherit�NotInheritable�Public�Class�ILogExtensions
[C#]
public�abstract�sealed�class�ILogExtensions

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This class contains methods for logging at different levels and checks the properties for determining if those logging levels are enabled in the current configuration.

Example

Simple example of logging messages

[C#]
using log4net.Util;

ILog log = LogManager.GetLogger("application-log");

log.InfoExt("Application Start");
log.DebugExt("This is a debug message");

Requirements

Namespace: log4net.Util

Assembly: log4net (in log4net.dll)

See Also

ILogExtensions Members | log4net.Util Namespace