This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
ConsoleLoggerOptions are not properly stored by ConsoleLoggerProvider #665
Closed
Description
As a result, Loggers are only updated with new settings when the options changes, and only the loggers already registered at the time the options are loaded are updated, new loggers get default settings.
This is because the constructor doesn't initialize _settings
with the current value: https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Extensions.Logging.Console/ConsoleLoggerProvider.cs#L39
Then when a logger is created, it uses the non-existent _settings
which means it falls back to default behavior: https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Extensions.Logging.Console/ConsoleLoggerProvider.cs#L105
/cc @davidfowl @pakrym
@Eilon @muratg This is necessary for RTM and a fairly trivial fix.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity