Exemple #1
0
        public static ILoggingBuilder AddFluentdLogger(
            this ILoggingBuilder builder,
            FluentdOptions fluentdOptions)
        {
            if (fluentdOptions == null)
            {
                throw new ArgumentNullException(nameof(fluentdOptions));
            }

            builder.Services
            .AddSingleton <IFluentdOptions>(fluentdOptions);

            return(builder.AddFluentdLogger(builder.Services));
        }
Exemple #2
0
        public static ILoggingBuilder AddProviderFluentdWithDefaults(
            this ILoggingBuilder loggingBuilder,
            FluentdOptions fluentdOptions)
        {
            loggingBuilder
            .Services
            .AddDefaultLogProperties()
            .AddDefaultLogSerializer();

            loggingBuilder
            .AddFluentdLogger(fluentdOptions);

            return(loggingBuilder);
        }