/// <summary> /// Initializes a new instance of the <see cref="SerilogLoggerFactory"/> class. /// </summary> /// <param name="logger">The Serilog logger; if not supplied, the static <see cref="Serilog.Log"/> will be used.</param> /// <param name="dispose">When true, dispose <paramref name="logger"/> when the framework disposes the provider. If the /// logger is not specified but <paramref name="dispose"/> is true, the <see cref="Log.CloseAndFlush()"/> method will be /// called on the static <see cref="Log"/> class instead.</param> /// <param name="providerCollection">A <see cref="LoggerProviderCollection"/>, for use with <c>WriteTo.Providers()</c>.</param> public SerilogLoggerFactory(ILogger logger = null, bool dispose = false, LoggerProviderCollection providerCollection = null) { _provider = new SerilogLoggerProvider(logger, dispose); _providerCollection = providerCollection; }
public LoggerProviderCollectionSink(LoggerProviderCollection providers) { _providers = providers ?? throw new ArgumentNullException(nameof(providers)); }