Beispiel #1
0
        public SimpleLogFactory(SimpleLogSettings settings, LogMessageActions actions)
        {
            Settings   = settings;
            LogActions = actions;
            SimpleLogs = new ConcurrentDictionary <string, ISimpleLog>(StringComparer.OrdinalIgnoreCase);

            CreateSimpleLogFunc = createArgs =>
            {
                var tryFixCategory = createArgs.Settings.TryFixCategory(createArgs.Category);
                var simpleLogLevel = createArgs.Settings.GetEnabledLevel(tryFixCategory);
                return(new SimpleLog(createArgs.LogActions)
                {
                    Category = tryFixCategory, EnabledLevel = simpleLogLevel
                });
            };
        }
Beispiel #2
0
 public SimpleLog(LogMessageActions actions)
 {
     LogActions = actions;
 }