-
Notifications
You must be signed in to change notification settings - Fork 39
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
AspNetCore: Add automatic configuration #86
base: master
Are you sure you want to change the base?
Conversation
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.
Can you please give a little more context on what are we trying to achieve by support for pulling configuration from DI
?
public LoggerProvider(IOptionsMonitor<LoggerOptions> options) | ||
{ | ||
optionsReloadToken = options.OnChange(ReConfig); |
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.
optionsReloadDisposable
/ optionsOnChangeDisposable
or something like that?
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.
Are you asking for the variable to be renamed?
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.
public LoggerProvider(IOptionsMonitor<LoggerOptions> options) | ||
{ | ||
optionsReloadToken = options.OnChange(ReConfig); |
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.
ReConfig
isn't a thread-safe method. Perhaps we need to make it thread-safe now?
Pulling configuration from DI allows us to use core's configuration system. For instance in dev I use See #87 |
Adds support for pulling configuration from DI. Also adds support for options reconfiguration.
Based on ConsoleLogger: https://github.com/aspnet/Extensions/tree/2.2.0/src/Logging/Logging.Console/src