public static LoggerConfiguration AMQP(this LoggerSinkConfiguration loggerSinkConfiguration, AMQPSinkOptions amqpOptions, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose)
        {
            var amqpSink = new AMQPSink(amqpOptions);

            var periodicBatchingOptions = amqpOptions.PeriodicBatchingSinkOptions;

            var batchingOptions = new PeriodicBatchingSinkOptions
            {
                BatchSizeLimit        = periodicBatchingOptions.BatchSizeLimit,
                Period                = periodicBatchingOptions.Period,
                EagerlyEmitFirstEvent = periodicBatchingOptions.EagerlyEmitFirstEvent,
                QueueLimit            = periodicBatchingOptions.QueueLimit
            };

            var batchingSink = new PeriodicBatchingSink(amqpSink, batchingOptions);

            return(loggerSinkConfiguration.Sink(batchingSink, restrictedToMinimumLevel));
        }
예제 #2
0
 public AMQPSink(AMQPSinkOptions options)
 {
     _options = options;
     InitializeConnection();
 }