1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 06:06:40 +02:00

Add a ThresholdHandler

This handler can be used to not let any messages from a certain lever through, unless they cross a configured threshold.
This is useful together with, for example, a MailHandler when some batch processing is done and you're only interested in
major failure and not a minor one.
This commit is contained in:
Kris Buist
2017-11-15 21:38:49 +01:00
parent 7b99283627
commit bd79504f1e
3 changed files with 239 additions and 0 deletions

View File

@@ -125,6 +125,10 @@
has accessors to read out the information.
- [_HandlerWrapper_](../src/Monolog/Handler/HandlerWrapper.php): A simple handler wrapper you can inherit from to create
your own wrappers easily.
- [_ThresholdHandler_](../src/Monolog/Handler/ThresholdHandler.php): This handler will buffer all the log messages it
receives, up until a configured threshold is reached, after it will pass all log messages to the wrapped handler.
Useful for applying in bath processing when you're only interested in significant failures instead of minor, single
erroneous events.
## Formatters