Пример #1
0
        public static ILoggerFactory AddColorConsoleLogger(this ILoggerFactory loggerFactory, Action <ColorConsoleLoggerConfiguration> configure)
        {
            var config = new ColorConsoleLoggerConfiguration();

            configure(config);
            return(loggerFactory.AddColorConsoleLogger(config));
        }
Пример #2
0
 public ColorConsoleLoggerProvider(ColorConsoleLoggerConfiguration config)
 {
     _config = config;
 }
Пример #3
0
 public static ILoggerFactory AddColorConsoleLogger(this ILoggerFactory loggerFactory, ColorConsoleLoggerConfiguration config)
 {
     loggerFactory.AddProvider(new ColorConsoleLoggerProvider(config));
     return(loggerFactory);
 }
Пример #4
0
 public ColorConsoleLogger(string name, ColorConsoleLoggerConfiguration config)
 {
     _name   = name;
     _config = config;
 }