Exemplo n.º 1
0
        public static LoggerConfiguration RedisStreamSink(
            this LoggerSinkConfiguration loggerConfiguration,
            RedisStreamSinkConfiguration redisStreamSinkConfiguration,
            string outputTemplate          = DefaultOutputTemplate,
            IFormatProvider formatProvider = null)
        {
            var formatter = new Serilog.Formatting.Display.MessageTemplateTextFormatter(outputTemplate, formatProvider);

            return(loggerConfiguration.Sink(new RedisStreamSink(redisStreamSinkConfiguration, formatter)));
        }
Exemplo n.º 2
0
 public RedisStreamSink(RedisStreamSinkConfiguration config, ITextFormatter textFormatter)
 {
     _formatter     = textFormatter;
     _configuration = config;
 }