Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

ConsoleLoggerOptions are not properly stored by ConsoleLoggerProvider #665

Closed
analogrelay opened this issue Jul 7, 2017 · 0 comments
Closed
Assignees
Milestone

Comments

@analogrelay
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants