7 using Serilog.Formatting.Json;
28 public LogEventLevel
ConsoleLogLevel {
get;
set; } = LogEventLevel.Warning;
33 public LogEventLevel
FileLogLevel {
get;
set; } = LogEventLevel.Information;
47 public Logger(
bool enableConsole,
bool enableDebug,
bool enableFile) {
57 var logCfg =
new LoggerConfiguration();
59 logCfg.WriteTo.Console(
ConsoleLogLevel, applyThemeToRedirectedOutput:
true);
62 logCfg.WriteTo.Debug(LogEventLevel.Debug);
Custom logger class for Hermod; internally uses Serilog.
LogEventLevel ConsoleLogLevel
bool EnableConsoleOutput
Gets or sets a value indicating whether or not to enable console logging.
RollingInterval FileRollingInterval
Logger(bool enableConsole, bool enableDebug, bool enableFile)
ILogger CreateLogger()
Creates a new instance of the Serilog logger.
LogEventLevel FileLogLevel
ILogger GetLogger()
Gets the instance of the Serilog logger.