src/Common.Logging.Sitecore/Adapter/CommonLoggingAppender.cs
/// <summary>
/// Sends the given log event to Common.Logging
/// </summary>
/// <param name="loggingEvent">
/// The logging Event.
/// </param>
Sends the given log event to Common.Logging
Sends the given log event to Common . Logging
protected override void Append(LoggingEvent loggingEvent)
        {
            var logger = LogManager.GetLogger(loggingEvent.LoggerName);
            var closestLevel = GetClosestLevel(loggingEvent.Level);
            var logMethod = logMethods[closestLevel];
            loggingEvent.Fix = FixFlags.LocationInfo;
            var exception = loggingEvent.GetPrivatePropertyValue<Exception>("m_thrownException");
            logMethod(logger, () => this.RenderLoggingEvent(loggingEvent), exception);
        }
protected override void Append ( LoggingEvent loggingEvent ) { var logger = LogManager . GetLogger ( loggingEvent . LoggerName ) ; var closestLevel = GetClosestLevel ( loggingEvent . Level ) ; var logMethod = logMethods [ closestLevel ] ; loggingEvent . Fix = FixFlags . LocationInfo ; var exception = loggingEvent . GetPrivatePropertyValue < Exception > ( " " ) ; logMethod ( logger , ( ) => this . RenderLoggingEvent ( loggingEvent ) , exception ) ; }
Sends the given log event to Common.Logging
Sends the given log event to Common . Logging
// Using reflection to get the exception for this logging event for old version of log4net that is wrapped by Sitecore.Logging // New versions of log4net expose the exception
loggingEvent
LoggingEvent
The logging Event.
The logging Event .