Ejemplo n.º 1
0
 public static IDisposable OpenGroup(this IActivityMonitor @this, LogLevel level, string text, Exception ex, [CallerFilePath] string fileName = null, [CallerLineNumber] int lineNumber = 0)
 {
     if (@this.ShouldLogGroup(level, fileName, lineNumber))
     {
         return(@this.UnfilteredOpenGroup(new ActivityMonitorGroupData(level | LogLevel.IsFiltered, null, text, @this.NextLogTime(), ex, null, fileName, lineNumber)));
     }
     return(@this.UnfilteredOpenGroup(new ActivityMonitorGroupData()));
 }
 /// <summary>
 /// Private method used by OpenXXX (Trace, Info,..., Fatal) extension methods.
 /// </summary>
 static IActivityMonitorGroupSender FilteredGroup( IActivityMonitor @this, LogLevel level, string fileName, int lineNumber )
 {
     Debug.Assert( (level & LogLevel.IsFiltered) == 0 );
     if( @this.ShouldLogGroup( level, fileName, lineNumber ) )
     {
         return new ActivityMonitorGroupSender( @this, level | LogLevel.IsFiltered, fileName, lineNumber );
     }
     return new ActivityMonitorGroupSender( @this );
 }
 /// <summary>
 /// Private method used by OpenXXX (Trace, Info,..., Fatal) extension methods.
 /// </summary>
 static IActivityMonitorGroupSender FilteredGroup(IActivityMonitor @this, LogLevel level, string fileName, int lineNumber)
 {
     Debug.Assert((level & LogLevel.IsFiltered) == 0);
     if (@this.ShouldLogGroup(level, fileName, lineNumber))
     {
         return(new ActivityMonitorGroupSender(@this, level | LogLevel.IsFiltered, fileName, lineNumber));
     }
     return(new ActivityMonitorGroupSender(@this));
 }