You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a sink/enrichment/filtering method accepts a parameter which is an interface, the different settings providers accept as a value "the qualified name of an implementation".
For instance, to specify an implementation of Serilog.Formatting.ITextFormatter such as Serilog.Formatting.Json.JsonFormatter, the following value can be passed : "Serilog.Formatting.Json.JsonFormatter, Serilog" , for instance :
For consistency it would be nice if Serilog.Settings.Configuration behaved the same and did not require to specify the assembly name Serilog for types that come from that assembly.
Tagging into this issue, I may do something about it shortly. My recent little Roslyn adventure led me to look more closely at a variety of ways to resolve various relationships between assemblies, types, and namespaces.
When a sink/enrichment/filtering method accepts a parameter which is an interface, the different settings providers accept as a value "the qualified name of an implementation".
For instance, to specify an implementation of
Serilog.Formatting.ITextFormatter
such asSerilog.Formatting.Json.JsonFormatter
, the following value can be passed :"Serilog.Formatting.Json.JsonFormatter, Serilog"
, for instance :It turns out that the AppSettings provider does not require the assembly name for methods coming from the Serilog assembly, and this can be used :
For consistency it would be nice if Serilog.Settings.Configuration behaved the same and did not require to specify the assembly name Serilog for types that come from that assembly.
(I have found this edge case whil working on serilog/serilog#1053 and have a failing test case here :
https://github.com/tsimbalar/serilog-settings-comparison/blob/b547207ebace1dc3e7283d1dba231132e7de0a3b/test/Serilog.Settings.Comparison.Tests/3-Advanced%20settings%20formats/331_ImplementationDefaultConstructor.cs#L21-L36
)
It looks lik serilog/serilog#1065 may be similar.
The text was updated successfully, but these errors were encountered: