public LogConfig(IFormatter formatter, LogCategoryRegistrar categoryRegistry = null) { Formatter = formatter; CategoryRegistrar = categoryRegistry ?? new LogCategoryRegistrar(); TargetConfigs = new List <TargetConfig>(); Levels = new bool[LogLevels.Levels.Length]; }
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); }
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 PlainTcpSocketTarget("logs6.papertrailapp.com", 26613, new SyslogFormatter("GrigoryP_Console", "Slotomania" + DateTime.Now.ToString("u")))); LogManager.Init(logConfig); }