protected LoggerDestinationBase(
            [NotNull] ITextLogFormatter textLogFormatter, [NotNull] IConfiguration configuration,
            [NotNull] string identifier)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            _TextLogFormatter = textLogFormatter ?? throw new ArgumentNullException(nameof(textLogFormatter));
            _Options          = configuration[$"Logging/Destinations/{identifier}"]
                                .Element <TOptions>()
                                .WithDefault(() => new TOptions());
        }
Beispiel #2
0
 public ConsoleLogDestination([NotNull] ITextLogFormatter textLogFormatter, [NotNull] IApplicationOptions options)
 {
     _TextLogFormatter = textLogFormatter ?? throw new ArgumentNullException(nameof(textLogFormatter));
     _Options          = options ?? throw new ArgumentNullException(nameof(options));
 }
Beispiel #3
0
 public DebugLogDestination([NotNull] ITextLogFormatter textLogFormatter)
 {
     _TextLogFormatter = textLogFormatter ?? throw new ArgumentNullException(nameof(textLogFormatter));
 }
Beispiel #4
0
 public DebugOutputLoggerDestination(
     [NotNull] ITextLogFormatter textLogFormatter, [NotNull] IConfiguration configuration)
     : base(textLogFormatter, configuration, "Debug")
 {
 }
Beispiel #5
0
 public ConsoleLoggerDestination(
     [NotNull] ITextLogFormatter textLogFormatter, [NotNull] IConfiguration configuration)
     : base(textLogFormatter, configuration, "Console")
 {
 }