Beispiel #1
0
 public LogConfig(IFormatter formatter, LogCategoryRegistrar categoryRegistry = null)
 {
     Formatter = formatter;
     CategoryRegistrar = categoryRegistry ?? new LogCategoryRegistrar();
     TargetConfigs = new List<TargetConfig>();
     Levels = new bool[LogLevels.Levels.Length];
 }
Beispiel #2
0
        private static void InitLogger()
        {
            var categoryRegistry = new LogCategoryRegistrar();
            var formatter = new LineFormatter(new DefaultCategoryFormatter(categoryRegistry));
            var logConfig = new LogConfig(formatter, categoryRegistry);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new ConsoleTarget());

            LogManager.Init(logConfig);
        }
 public DefaultCategoryFormatter(LogCategoryRegistrar categoryRegistry)
 {
     _categoryRegistry = categoryRegistry;
 }
Beispiel #4
0
 public DefaultCategoryFormatter(LogCategoryRegistrar categoryRegistry)
 {
     _categoryRegistry = categoryRegistry;
 }