private static ISeriLogger ConfigureSerilogLogger(CorrelationEnricher correlationEnricher, LogEventLevel minimulLogLevel)
        {
            var config =
                new LoggerConfiguration()
                .MinimumLevel.ControlledBy(new LoggingLevelSwitch(minimulLogLevel))
                .Enrich.With(correlationEnricher);

            ISeriLogger logger = ConfigureSerilogConsole();

            return(logger);

            ISeriLogger ConfigureSerilogConsole()
            {
                logger = config.WriteTo.Console(formatter: new JsonFormatter(renderMessage: false)).CreateLogger();
                logger.Information("Console logging has been configured");

                return(logger);
            }
        }
 public SplunkSerilogLoggerProvider(CorrelationEnricher correlationEnricher, IOptionsMonitor <LoggingOptions> loggingOptions)
     : base(ConfigureSerilogLogger(correlationEnricher, SetLogEventLevel(loggingOptions.CurrentValue.MinimumLogLevel)), false)
 {
 }