-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
I'd like to change log level in runtime for a single request.
My scenario is when customer report a bug that can only repro in PROD, they can send a request with additional parameter debug=1 like https://mywebservice.com/request?para1=value1&debug=1
And in runtime, I will create a logger with LogLevel = Debug, and very thing will be logged.
Change the log level in environment variable or appsettings.json will impact other queries, but we are not allowed to touch any customer data.
Describe the solution you'd like
I'd like to have an overload method with additional parameter in ILoggerFactory.CreateLogger(LogLevel loglevel)
Additional context
No response
svengeance