Common Logging 2.0 API Reference

CommonLoggingAppender Class

Routes log events to Common.Logging infrastructure.

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

System.Object
   AppenderSkeleton
      CommonLoggingAppender

[Visual Basic]
Public Class CommonLoggingAppender
    Inherits AppenderSkeleton
[C#]
public class CommonLoggingAppender : AppenderSkeleton

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.

Example

To route all events logged using log4net to Common.Logging, you need to configure this appender as shown below:

<log4net>
    <appender name="CommonLoggingAppender" 
              type="Common.Logging.Log4Net.CommonLoggingAppender, Common.Logging.Log4Net">
        <layout type="log4net.Layout.PatternLayout, log4net">
            <param name="ConversionPattern" value="%level - %class.%method: %message" />
        </layout>
    </appender>

    <root>
        <level value="ALL" />
        <appender-ref ref="CommonLoggingAppender" />
    </root>
</log4net>

Requirements

Namespace: Common.Logging.Log4Net

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

See Also

CommonLoggingAppender Members | Common.Logging.Log4Net Namespace