Description
Description of the feature request
It would be great if the logger could collect some unwritten logs (maybe a configurable amount that defaults to 10 or something) and if there is an error
logged it would also write any logs that were not already written.
Problem statement
I've always hated that the debug logs are never available when I need them. They are typically turned off in a production system, but when there is an error I'd like to have information from those logs. I don't want them most of the time, so really only when an error occurs. Sampling isn't a good option because the error may be intermittent and the logs will not be present for the relevant time.
Summary of the feature
Basically, at the point when the decision is made whether to log it would either log (current functionality) or store the log. If there was an error log it would log the error as well as everything stored (and flush the store).
Code examples
Benefits for you and the wider AWS community
Faster time to resolution on errors
Describe alternatives you've considered
I've looked at doing something like this myself but haven't tried it yet. As I mentioned, sampling doesn't accomplish what I'm looking for.
Additional context
Related issues, RFCs
Sub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Status