Example #1
0
    public static ILoggingBuilder AddNikeJsonConsole(this ILoggingBuilder builder,
                                                     Action <JsonConsoleFormatterOptions> configure)
    {
        builder.AddJsonConsole(configure);

        return(builder);
    }
 public static ILoggingBuilder AddCustom(this ILoggingBuilder builder, string value)
 {
     return(value switch
     {
         NewtomsoftConfiguration.CONSOLE_OUTPUT => builder.AddConsole(),
         NewtomsoftConfiguration.DEBUG_OUTPUT => builder.AddDebug(),
         NewtomsoftConfiguration.JSONCONSOLE_OUTPUT => builder.AddJsonConsole(),
         _ => builder,
     });
        public static ILoggingBuilder AddJsonConsole(this ILoggingBuilder builder, Action <JsonConsoleLoggerOptions> configure)
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            builder.AddJsonConsole();
            builder.Services.Configure(configure);

            return(builder);
        }
 public static ILoggingBuilder AddDistributorLogger(this ILoggingBuilder builder, DistributorConfig config)
 {
     return(config.UseJsonLogger ? builder.AddJsonConsole() : builder.AddConsole());
 }