-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for LoggingLevelSwitch #88
Conversation
ApplyAuditSinks(loggerConfiguration, declaredLevelSwitches); | ||
} | ||
|
||
private IReadOnlyDictionary<string, LoggingLevelSwitch> ProcessLevelSwitchDeclarations() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor nitpick- the Serilog repos don't use explicit private
or internal
(I think there might be a DotSettings file in the main repo.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes indeed :) I'll copy over the .DotSettings
file from the main repo to detect those cases.
Looks awesome 👍 Just added one minor nitpick - keen to get this to |
solves serilog#69 Supports : - declaration of LoggingLevelSwitch - MinimumLevel.ControlledBy(switch) - MinimumLevel.Override(prefix, switch) - passing a switch by reference as the argument to a Sink (or any callable method)
Copy over .editorconfig and .sln.DotSettings from core repo Fix ReSharper red squigglies Fix remaining ReSharper warnings (possible multiple enumeration) Remove implicit "private" keywords
12702d1
to
7034ca6
Compare
I've updated the code based on your comments :) |
🎉 |
fixes #69
Supports :
JSON syntax :
but also overrides :
In order to implement "look up a switch by name", I had to change
IConfigurationArgumentValue
's methodobject ConvertTo(Type toType)
toobject ConvertTo(Type toType, IReadOnlyDictionary<string, LoggingLevelSwitch> declaredLevelSwitches)
and cascade that change everywhere ...