Exemple #1
0
        public static ILoggingBuilder AddTelegram(this ILoggingBuilder builder, TelegramLoggerOptions options)
        {
            var loggerProcessor = new TelegramLoggerProcessor(options);

            return(builder.AddProvider(new TelegramLoggerProvider(loggerProcessor, options)));
        }
Exemple #2
0
 public TelegramLogger(string name, TelegramLoggerOptions options, TelegramLoggerProcessor loggingProcessor)
 {
     _loggingProcessor = loggingProcessor ?? throw new ArgumentNullException(nameof(loggingProcessor));
     _options          = options ?? throw new ArgumentNullException(nameof(options));
     _formatter        = new TelegramMessageFormatter(name, options);
 }