public static void Reconfigure(SolaceConsoleLoggerConfiguration config) { lock (console_lock) { replacement_static_config = config; } }
public SolaceConsoleLogger(string name, SolaceConsoleLoggerConfiguration config) { _name = name; _config = config; static_config ??= config; Id = new EventId(_config.EventId, _name); }
public LogItem(SolaceConsoleLoggerConfiguration config, LogLevel logLevel, EventId eventId, string name, object?state, Exception?exception) { TimeStamp = DateTime.UtcNow; Configuration = config; Level = logLevel; Id = eventId; Name = name; State = state; Exception = exception; }
public static ILoggingBuilder AddSolaceConsoleLogger(this ILoggingBuilder builder, Action <SolaceConsoleLoggerConfiguration>?configure) { var config = new SolaceConsoleLoggerConfiguration(); configure?.Invoke(config); var provider = new SolaceConsoleLoggerProvider(config); builder.AddProvider(provider); return(builder); }
public SolaceConsoleLoggerConfiguration(SolaceConsoleLoggerConfiguration other) { LogLevel = other.LogLevel; EventId = other.EventId; TimeStampFormat = other.TimeStampFormat; TrimNames = new List <string>(other.TrimNames); ReplaceNames = new Dictionary <string, string>(other.ReplaceNames); FormatterFactory = other.FormatterFactory; Token = other.Token; Theme = other.Theme; InternalLoggerQueueOverloadThreshold = other.InternalLoggerQueueOverloadThreshold; StringifyOption = other.StringifyOption; }
public static ILoggingBuilder AddSolaceConsoleLogger(this ILoggingBuilder builder, LogLevel log_level) { var config = new SolaceConsoleLoggerConfiguration() { LogLevel = log_level, }; var provider = new SolaceConsoleLoggerProvider(config); builder.AddProvider(provider); return(builder); }
public SolaceConsoleLoggerProvider(SolaceConsoleLoggerConfiguration config) { _config = config; }