Common Logging 2.0 API Reference

Log4NetLogger Class

Concrete implementation of ILog interface specific to log4net 1.2.10.

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

System.Object
   AbstractLogger
      Log4NetLogger

[Visual Basic]
Public Class Log4NetLogger
    Inherits AbstractLogger
[C#]
public class Log4NetLogger : AbstractLogger

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

Log4net is capable of outputting extended debug information about where the current message was generated: class name, method name, file, line, etc. Log4net assumes that the location information should be gathered relative to where Debug() was called. When using Common.Logging, Debug() is called in Common.Logging.Log4Net.Log4NetLogger. This means that the location information will indicate that Common.Logging.Log4Net.Log4NetLogger always made the call to Debug(). We need to know where Common.Logging.ILog.Debug() was called. To do this we need to use the log4net.ILog.Logger.Log method and pass in a Type telling log4net where in the stack to begin looking for location information.

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net (in Common.Logging.Log4Net.dll)

See Also

Log4NetLogger Members | Common.Logging.Log4Net Namespace