Beispiel #1
0
 private LoggerPhaseScope(CapturedLoggerPhaseScope captured, LogLevel?perfLogLevel)
 {
     _originPhaseName = GetPhaseName();
     SetPhaseName(captured.PhaseName);
     if (perfLogLevel != null)
     {
         _performanceScope = new PerformanceScope("Scope:" + captured.PhaseName, perfLogLevel.Value);
     }
 }
Beispiel #2
0
 private LoggerPhaseScope(CapturedLoggerPhaseScope captured, bool enablePerformanceScope)
 {
     _originPhaseName = GetPhaseName();
     SetPhaseName(captured.PhaseName);
     if (enablePerformanceScope)
     {
         _performanceScope = new PerformanceScope("Scope:" + captured.PhaseName, LogLevel.Diagnostic);
     }
 }
Beispiel #3
0
 private LoggerPhaseScope(CapturedLoggerPhaseScope captured, bool enablePerformanceScope)
 {
     _originPhaseName = GetPhaseName();
     SetPhaseName(captured.PhaseName);
     if (enablePerformanceScope)
     {
         _performanceScope = new PerformanceScope("Scope:" + captured.PhaseName, LogLevel.Diagnostic);
     }
 }
        private LoggerPhaseScope(CapturedLoggerPhaseScope captured, LogLevel?perfLogLevel)
        {
            _originPhaseName = GetPhaseName();
            var context = captured.CurrentAmbientContext;

            if (context.HasValue)
            {
                _ac = new AmbientContext(context.Value);
            }
            SetPhaseName(captured.PhaseName);
            if (perfLogLevel != null)
            {
                _performanceScope = new PerformanceScope("Scope:" + captured.PhaseName, perfLogLevel.Value);
            }
        }