/// <summary>
 /// A custom ILogger providing addtional functionality like logging an exception and all its details and allowing the user to change the Console color.
 /// https://docs.microsoft.com/en-us/dotnet/core/extensions/custom-logging-provider
 /// </summary>
 /// <param name="name"></param>
 /// <param name="configuration"></param>
 public NKitConsoleLogger(string name, NKitConsoleLoggerConfiguration configuration)
 {
     DataValidator.ValidateStringNotEmptyOrNull(name, nameof(name), nameof(NKitConsoleLogger));
     DataValidator.ValidateObjectNotNull(configuration, nameof(configuration), nameof(NKitConsoleLogger));
     _name          = name;
     _configuration = configuration;
 }
Exemple #2
0
 public NKitConsoleLoggerProvider(NKitConsoleLoggerConfiguration configuration)
 {
     DataValidator.ValidateObjectNotNull(configuration, nameof(configuration), nameof(NKitConsoleLoggerProvider));
     _configuration = configuration;
     _loggers       = new ConcurrentDictionary <string, NKitConsoleLogger>();
 }