Closed jceddy closed 7 years ago
I have a logger being created with minimum level == Verbose, like this:
Logger log = new LoggerConfiguration().WriteTo.RollingFileAlternate( FrameworkSettings.Logging.ClientPath, logFilePrefix, minimumLevel: _minumumLevel, outputTemplate: _outputTemplate, fileSizeLimitBytes: 10 1024 1024, retainedFileCountLimit: 100 ).CreateLogger();
But when I use the "Verbose" function to write to the log:
writer.Verbose(logEntry.ExtendedProperties.ContainsKey("Exception") ? (Exception)logEntry.ExtendedProperties["Exception"] : null, formattedMessage);
Nothing is written.
This works fine with other logging levels such as "Information", though...
Hi @jceddy - you'll need to call .MinimumLevel.Verbose() on the LoggerConfiguration to turn on verbose logging - the minimumLevel parameter here is just a filter. HTH!
.MinimumLevel.Verbose()
LoggerConfiguration
minimumLevel
@nblumhardt Thanks.
I have a logger being created with minimum level == Verbose, like this:
Logger log = new LoggerConfiguration().WriteTo.RollingFileAlternate( FrameworkSettings.Logging.ClientPath, logFilePrefix, minimumLevel: _minumumLevel, outputTemplate: _outputTemplate, fileSizeLimitBytes: 10 1024 1024, retainedFileCountLimit: 100 ).CreateLogger();
But when I use the "Verbose" function to write to the log:
writer.Verbose(logEntry.ExtendedProperties.ContainsKey("Exception") ? (Exception)logEntry.ExtendedProperties["Exception"] : null, formattedMessage);
Nothing is written.
This works fine with other logging levels such as "Information", though...