src/Common.Logging.Sitecore/Adapter/SitecoreLogger.cs
/// <summary>
/// Actually sends the message to the underlying log system.
/// </summary>
/// <param name="logLevel">
/// the level of this log event.
/// </param>
/// <param name="message">
/// the message to log
/// </param>
/// <param name="exception">
/// the exception to log (may be null)
/// </param>
Actually sends the message to the underlying log system.
Actually sends the message to the underlying log system .
protected override void WriteInternal(LogLevel logLevel, object message, Exception exception)
        {
            if (callerStackBoundaryType == null)
            {
                lock (this.GetType())
                {
                    var local0 = new StackTrace();
                    var local1 = this.GetType();
                    callerStackBoundaryType = typeof(AbstractLogger);
                    for (var local2 = 1; local2 < local0.FrameCount; ++local2)
                    {
                        if (!this.IsInTypeHierarchy(local1, local0.GetFrame(local2).GetMethod().DeclaringType))
                        {
                            callerStackBoundaryType = local0.GetFrame(local2 - 1).GetMethod().DeclaringType;
                            break;
                        }
                    }
                }
            }
            var level = GetLevel(logLevel);
            this._logger.Log(callerStackBoundaryType.FullName, level, message, exception);
        }
protected override void WriteInternal ( LogLevel logLevel , object message , Exception exception ) { if ( callerStackBoundaryType == null ) { lock ( this . GetType ( ) ) { var local0 = new StackTrace ( ) ; var local1 = this . GetType ( ) ; callerStackBoundaryType = typeof ( AbstractLogger ) ; for ( var local2 = 1 ; local2 < local0 . FrameCount ; ++ local2 ) { if ( ! this . IsInTypeHierarchy ( local1 , local0 . GetFrame ( local2 ) . GetMethod ( ) . DeclaringType ) ) { callerStackBoundaryType = local0 . GetFrame ( local2 - 1 ) . GetMethod ( ) . DeclaringType ; break ; } } } } var level = GetLevel ( logLevel ) ; this . _logger . Log ( callerStackBoundaryType . FullName , level , message , exception ) ; }
Actually sends the message to the underlying log system.
Actually sends the message to the underlying log system .
logLevel
LogLevel
the level of this log event.
the level of this log event .
message
object
the message to log
the message to log
exception
Exception
the exception to log (may be null)
the exception to log ( may be null )