-
Notifications
You must be signed in to change notification settings - Fork 245
Allow configuring the trace source logger without having to flow a TraceListener instance #405
Comments
@davidfowl why did we remove this constructor? |
Tentatively putting it in 1.0.0. We'll discuss after RC2 ships. |
Fixed in 5019dd2 |
@moozzyk thanks! Quick question: any particular reason to not provide an overload of https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Extensions.Logging.TraceSource/TraceSourceFactoryExtensions.cs#L27 |
@PinpointTownes - thanks for pointing this out. I will look into this. |
We enabled passing null TraceListener but extension methods were not updated accordingly and would still not allow to pass a null TraceListner.
We enabled passing null TraceListener but extension methods were not updated accordingly and would still not allow to pass a null TraceListner.
We enabled passing null TraceListener but extension methods were not updated accordingly and would still not allow to pass a null TraceListner.
Added overloads that don't take TraceListener e6af0dc |
Unlike Katana's
DiagnosticsLoggerFactory
, the vNext equivalent now requires aTraceListener
, which makes the trace source logger a bit painful to use in practice, since you can't simply rely on the listeners defined at the static level (that may be registered via the .config file on .NET Desktop)Please consider updating
TraceSourceLoggerProvider
to make this parameter optional and offering a simplerAddTraceSource
that doesn't require a specific trace listener.@davidfowl do you remember why you had removed the parameterless constructor? https://github.com/aspnet/Logging/pull/143/files#diff-ca74d694fa53328497b21b4a9528dae5L28
/cc @muratg
The text was updated successfully, but these errors were encountered: