Exemplo n.º 1
0
 internal SlackLogger(
     [NotNull] ISlackLogEntriesSender sender,
     [NotNull] string componentName,
     [NotNull] Func <Microsoft.Extensions.Logging.LogLevel, string> channelResolver,
     bool filterOutChaosException)
 {
     _componentName           = componentName ?? throw new ArgumentNullException(componentName);
     _sender                  = sender ?? throw new ArgumentNullException(nameof(sender));
     _channelResolver         = channelResolver ?? throw new ArgumentNullException(nameof(channelResolver));
     _filterOutChaosException = filterOutChaosException;
 }
Exemplo n.º 2
0
        internal SlackLoggerProvider(
            [NotNull] string azureQueueConnectionString,
            [NotNull] string azureQueuesBaseName,
            [NotNull] ISpamGuard <Microsoft.Extensions.Logging.LogLevel> spamGuard,
            [NotNull] Func <Microsoft.Extensions.Logging.LogLevel, string> channelResolver,
            bool filterOutChaosException)
        {
            _spamGuard       = spamGuard ?? throw new ArgumentNullException(nameof(spamGuard));
            _channelResolver = channelResolver ?? throw new ArgumentNullException(nameof(channelResolver));

            _loggers = new ConcurrentDictionary <string, ILogger>();
            _sender  = new SlackLogEntriesSender(azureQueueConnectionString, azureQueuesBaseName);

            _filterOutChaosException = filterOutChaosException;
        }