Open jhannes opened 5 years ago
In order to avoid spam to high-intrusion channels (Slack, Email), this must be possible to combine with the cooldownTime
. But that means that there is a risk that more MDC-batches will be included in the same report. (For example if a client spams with requests that cause errors) The events must probably be grouped somehow on the mdcKey.
It would be nice to set loglevel on a logger based on mdc values. E.g.
logger.org.foo.bar=INFO,TRACE@mdc:user=testing console
Batch up messages in a context and process all only if at least one was over a given threshold. This is useful to get the full context of an error situation.
This can probably be implemented with
MDC.put
andMDC.remove
acting as the boundaries.Possible configuration syntax:
(Suggested by Axel Fontaine)