Beispiel #1
0
        public static LoggerConfiguration NewRelic(this LoggerSinkConfiguration loggerSinkConfiguration,
                                                   NewRelicSinkOptions options = null
                                                   )
        {
            options = options ?? new NewRelicSinkOptions();
            var sink = new NewRelicLogsSink(options);

            return(loggerSinkConfiguration.Sink(
                       sink,
                       options.RestrictedToMinimumLevel,
                       options.LevelSwitch
                       ));
        }
Beispiel #2
0
 public NewRelicLogsSink(NewRelicSinkOptions options) : base(options.BatchSize, options.BatchPeriod)
 {
     options.Validate();
     Options   = options;
     Formatter = Options.CustomFormatter ?? new NewRelicFormatter();
 }