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());
        }
Example #2
0
 public ConsoleLogDestination([NotNull] ITextLogFormatter textLogFormatter, [NotNull] IApplicationOptions options)
 {
     _TextLogFormatter = textLogFormatter ?? throw new ArgumentNullException(nameof(textLogFormatter));
     _Options          = options ?? throw new ArgumentNullException(nameof(options));
 }
Example #3
0
 public DebugLogDestination([NotNull] ITextLogFormatter textLogFormatter)
 {
     _TextLogFormatter = textLogFormatter ?? throw new ArgumentNullException(nameof(textLogFormatter));
 }
Example #4
0
 public DebugOutputLoggerDestination(
     [NotNull] ITextLogFormatter textLogFormatter, [NotNull] IConfiguration configuration)
     : base(textLogFormatter, configuration, "Debug")
 {
 }
Example #5
0
 public ConsoleLoggerDestination(
     [NotNull] ITextLogFormatter textLogFormatter, [NotNull] IConfiguration configuration)
     : base(textLogFormatter, configuration, "Console")
 {
 }