Exemple #1
0
        public ClsLoggerProvider(ClsWriter writer, IOptionsMonitor <LoggingOptions> options)
        {
            _writer = writer;

            _loggingOptions = options.CurrentValue;
            TurnLoggerLevels();

            options.OnChange(newValue =>
            {
                _loggingOptions = newValue;
                TurnLoggerLevels();
            });
        }
Exemple #2
0
 public ClsLogger(string categoryName, ClsWriter writer, Func <LogLevel, bool> checkEnableFunc)
 {
     _categoryName    = categoryName;
     _writer          = writer;
     _checkEnableFunc = checkEnableFunc;
 }