private LoggerPhaseScope(CapturedLoggerPhaseScope captured, LogLevel?perfLogLevel) { _originPhaseName = GetPhaseName(); SetPhaseName(captured.PhaseName); if (perfLogLevel != null) { _performanceScope = new PerformanceScope("Scope:" + captured.PhaseName, perfLogLevel.Value); } }
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, bool enablePerformanceScope) { _originPhaseName = GetPhaseName(); SetPhaseName(captured.PhaseName); if (enablePerformanceScope) { _performanceScope = new PerformanceScope("Scope:" + captured.PhaseName, LogLevel.Diagnostic); } }
public LoggerPhaseScope(string phaseName, bool enablePerformanceScope) { if (string.IsNullOrWhiteSpace(phaseName)) { throw new ArgumentException("Phase name cannot be null or white space.", nameof(phaseName)); } _originPhaseName = GetPhaseName(); SetPhaseName(_originPhaseName == null ? phaseName : _originPhaseName + "." + phaseName); if (enablePerformanceScope) { _performanceScope = new PerformanceScope("Scope:" + phaseName, LogLevel.Diagnostic); } }
private LoggerPhaseScope(string phaseName, LogLevel?perfLogLevel) { if (string.IsNullOrWhiteSpace(phaseName)) { throw new ArgumentException("Phase name cannot be null or white space.", nameof(phaseName)); } _originPhaseName = GetPhaseName(); phaseName = _originPhaseName == null ? phaseName : _originPhaseName + "." + phaseName; SetPhaseName(phaseName); if (perfLogLevel != null) { _performanceScope = new PerformanceScope("Scope:" + phaseName, perfLogLevel.Value); } }
public LoggerPhaseScope(string phaseName, bool enablePerformanceScope) { if (string.IsNullOrWhiteSpace(phaseName)) { throw new ArgumentException("Phase name cannot be null or white space.", nameof(phaseName)); } _originPhaseName = GetPhaseName(); phaseName = _originPhaseName == null ? phaseName : _originPhaseName + "." + phaseName; SetPhaseName(phaseName); if (enablePerformanceScope) { _performanceScope = new PerformanceScope("Scope:" + 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); } }
private LoggerPhaseScope(string phaseName, LogLevel?perfLogLevel, AggregatedPerformanceScope aggregatedPerformanceLogger) { if (string.IsNullOrWhiteSpace(phaseName)) { throw new ArgumentException("Phase name cannot be null or white space.", nameof(phaseName)); } _ac = AmbientContext.GetOrCreateAmbientContext().CreateBranch(); _originPhaseName = GetPhaseName(); phaseName = _originPhaseName == null ? phaseName : _originPhaseName + "." + phaseName; SetPhaseName(phaseName); if (perfLogLevel != null) { _performanceScope = new PerformanceScope("Scope:" + phaseName, perfLogLevel.Value, aggregatedPerformanceLogger); } }