public MethodLogScope(ILogger logger, MethodLoggingSettings settings, MethodBase methodInfo) { _settings = settings; if (_settings.LogLevel > LogLevel.Error) { return; } _currentExecutionContext = Thread.CurrentThread.ExecutionContext; AppDomain.CurrentDomain.FirstChanceException += FirstChanceExceptionHandler; _logger = logger; _methodInfo = methodInfo; }
public MethodLoggerFactory(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; _settings = serviceProvider.GetService <MethodLoggingSettings>() ?? new MethodLoggingSettings(); }
public MethodLogger(ILoggerFactory loggerFactory, Type callerType, MethodLoggingSettings settings) { _loggerFactory = loggerFactory; _callerType = callerType; _settings = settings; }