-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed as not planned
Labels
area-Extensions-LoggingquestionAnswer questions and provide assistance, not an issue with source code or documentation.Answer questions and provide assistance, not an issue with source code or documentation.
Milestone
Description
When running in production environment I'd like to have few log messages, if nothing terrible happens.
But in case of failure I need to get all the details and how request was processed.
The problem is that each log entry is independent, and log level is configured on application start.
Describe the solution you'd like
Why not let logger have additional mode of operation?
- All messages are grouped in a batch (default "size" = all the messages related to processing single request)
- Sending batchade messages works this way:
- If there are messages with particular log level, then all messages are sent.
- Otherwise messeges are filtered according to the configured log level.
For example:
I can have as many LogTrace calls as I want in my code, but these messsages won't appear in log unless I call LogError, which is equivalent to dynamically switching to Trace log level in case of error.
This mode can affect performance however, because all messages should be kepr in memory until batch is completed.
NightlyRevenger
Metadata
Metadata
Assignees
Labels
area-Extensions-LoggingquestionAnswer questions and provide assistance, not an issue with source code or documentation.Answer questions and provide assistance, not an issue with source code or documentation.