-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Register Logging Services Correctly #2500
Register Logging Services Correctly #2500
Conversation
This is a non-issue imo, either the installer or the user should handle it imo |
Can we check if users have a default (not user-changed) pre-this PR config file and overwrite it automatically? This would handle most update scenarios. |
Yeah we could do that. Would that be something more appropriate to put in the installer perhaps? We would only want that check to run a single time during the version update, not every server startup. |
Just a follow-up... we have very different installers and installation methods, including those where there is no installer at all (like docker images or portable installs). So I think the server should deal with it... |
Created a new issue to deal with this: #2511 |
Register logging services correctly with the DI container so they are resolved correctly.
Changes
UseSerilog()
which registersILoggerFactory
andILogger<T>
ILogger
but add a TODO note to deprecate it in favour ofILogger<T>
Microsoft
andSystem
namespaces to a min level ofWarning
, which is recommended in the Serilog documentation. If we don't to make this change, we need to at least reduce the output forMicrosoft.AspNetCore
which clogs up the logs with every single request to the server at levelInfo
Still To Address
We have no way to push an update to the logging configuration for existing users. At startup, if the user's
logging.json
settings file already exists, then it is loaded as-is and the bundled resource settings file is ignored.Issues
Fixes #2498