Exemple #1
0
        public static ILoggerFactory AddColorConsoleLogger(this ILoggerFactory loggerFactory, Action <ColorConsoleLoggerConfiguration> configure)
        {
            var config = new ColorConsoleLoggerConfiguration();

            configure(config);
            return(loggerFactory.AddColorConsoleLogger(config));
        }
 public ColorConsoleLogger(string name, ColorConsoleLoggerConfiguration config)
 {
     _name   = name;
     _config = config;
 }
Exemple #3
0
 public static ILoggerFactory AddColorConsoleLogger(this ILoggerFactory loggerFactory, ColorConsoleLoggerConfiguration config)
 {
     loggerFactory.AddProvider(new ColorConsoleLoggerProvider(config));
     return(loggerFactory);
 }
 public ColorConsoleLoggerProvider(ColorConsoleLoggerConfiguration config)
 {
     _config = config;
 }