public RabbitMqSink( RabbitMqSinkOptions options, IEndpointResolver endpointResolver, Action<ConnectionFactory> connectionFactorySetup, ITextFormatter formatter, TextToBinaryFormatterOptions formatterOptions = null, string clientProviderName = null) : this(options, endpointResolver, connectionFactorySetup,
private static RabbitMqSinkOptions Create(this LoggerSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup) { if (optionsSetup == null) { throw new ArgumentNullException(nameof(optionsSetup)); } RabbitMqSinkOptions options = new RabbitMqSinkOptions(); optionsSetup.Invoke(options); return(options); }
private static RabbitMqSinkOptions Create(this LoggerAuditSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup) { if (optionsSetup == null) { throw new ArgumentNullException(nameof(optionsSetup)); } RabbitMqSinkOptions options = new RabbitMqSinkOptions(); // Set confirm publish by default for Audit options.ConfirmPublish = true; options.ExchangeName = RabbitMqSinkOptions.DefaultAuditToExchange; optionsSetup.Invoke(options); return(options); }
public static LoggerAuditSinkConfiguration RabbitMq( this LoggerAuditSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup, IConnection connection, IBinaryFormatter binaryFormatter, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch levelSwitch = null, bool autoCloseConnection = true) { RabbitMqSinkOptions options = configuration.Create(optionsSetup); RabbitMqSink rabbitMqSink = new RabbitMqSink(options, connection, binaryFormatter, autoCloseConnection); configuration.Sink(rabbitMqSink, restrictedToMinimumLevel, levelSwitch); return(configuration); }
public static LoggerSinkConfiguration RabbitMq( this LoggerSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup, AmqpTcpEndpoint endpoint, Action <ConnectionFactory> connectionFactorySetup, IBinaryFormatter binaryFormatter, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch levelSwitch = null, string clientProviderName = null) { RabbitMqSinkOptions options = configuration.Create(optionsSetup); RabbitMqSink rabbitMqSink = new RabbitMqSink(options, endpoint, connectionFactorySetup, binaryFormatter, clientProviderName); configuration.Sink(rabbitMqSink, restrictedToMinimumLevel, levelSwitch); return(configuration); }
public static LoggerAuditSinkConfiguration RabbitMq( this LoggerAuditSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup, IConnection connection, LogEventJsonConverterOptions jsonConverterOptions = null, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch levelSwitch = null, bool autoCloseConnection = true) { RabbitMqSinkOptions options = configuration.Create(optionsSetup); RabbitMqSink rabbitMqSink = new RabbitMqSink(options, connection, new JsonToUtf8BytesFormatter(jsonConverterOptions ?? new LogEventJsonConverterOptions()), autoCloseConnection); configuration.Sink(rabbitMqSink, restrictedToMinimumLevel, levelSwitch); return(configuration); }
public static LoggerAuditSinkConfiguration RabbitMq( this LoggerAuditSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup, IEndpointResolver endpointResolver, Action <ConnectionFactory> connectionFactorySetup, LogEventJsonConverterOptions jsonConverterOptions = null, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch levelSwitch = null, string clientProviderName = null) { RabbitMqSinkOptions options = configuration.Create(optionsSetup); RabbitMqSink rabbitMqSink = new RabbitMqSink(options, endpointResolver, connectionFactorySetup, new JsonToUtf8BytesFormatter(jsonConverterOptions ?? new LogEventJsonConverterOptions()), clientProviderName); configuration.Sink(rabbitMqSink, restrictedToMinimumLevel, levelSwitch); return(configuration); }
public ChannelsPoolPolicy(IConnection connection, RabbitMqSinkOptions options) { Connection = connection; Options = options; }