コード例 #1
0
ファイル: SimpleLogSpec.cs プロジェクト: congzw/common-utils
        public ISimpleLogFactory CreateFactory()
        {
            var simpleLogSettings = new SimpleLogSettings();

            simpleLogSettings.Default = new SimpleLogSetting()
            {
                Category = SimpleLogSettings.DefaultCategory, EnabledLevel = DefaultLevel
            };
            simpleLogSettings.SetEnabledLevel(FooCategory, FooLevel);
            return(new SimpleLogFactory(simpleLogSettings, new LogMessageActions()));
        }
コード例 #2
0
 public SimpleLogFactory()
 {
     Settings   = new SimpleLogSettings();
     SimpleLogs = new ConcurrentDictionary <string, ISimpleLog>(StringComparer.OrdinalIgnoreCase);
 }
コード例 #3
0
ファイル: SimpleLog.cs プロジェクト: congzw/demo-socket
 public SimpleLogFactory(SimpleLogSettings settings, LogMessageActions actions)
 {
     Settings   = settings;
     LogActions = actions;
     SimpleLogs = new ConcurrentDictionary <string, ISimpleLog>(StringComparer.OrdinalIgnoreCase);
 }