1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-21 04:11:47 +02:00

Add a SamplingHandler

It wraps around another handler, and only passes on some messages
based on the provided sampling handler.

This was originally written for MediaWiki: https://gerrit.wikimedia.org/r/181346
This commit is contained in:
Kunal Mehta
2014-12-23 12:04:36 -08:00
parent 5bee6fe56c
commit d79400bade
3 changed files with 126 additions and 0 deletions

View File

@@ -186,6 +186,8 @@ Handlers
sent to all the handlers it is configured with.
- _FilterHandler_: This handler only lets records of the given levels through
to the wrapped handler.
- _SamplingHandler_: Wraps around another handler and lets you sample records
if you only want to store some of them.
- _TestHandler_: Used for testing, it records everything that is sent to it and
has accessors to read out the information.
- _WhatFailureGroupHandler_: This handler extends the _GroupHandler_ ignoring