$processors
$processors : callable[]
Sampling handler
A sampled event stream can be useful for logging high frequency events in a production environment where you only need an idea of what is happening and are not concerned with capturing every occurrence. Since the decision to handle or not handle a particular event is determined randomly, the resulting sampled log is not guaranteed to contain 1/N of the events that occurred in the application, but based on the Law of large numbers, it will tend to be close to this ratio with a large number of attempts.
$processors : callable[]
$level : int
$bubble : bool
$handler : \Monolog\Handler\HandlerInterface|callable
$factor : int
__construct(callable|\Monolog\Handler\HandlerInterface $handler, int $factor) : mixed
callable|\Monolog\Handler\HandlerInterface | $handler | Handler or factory callable($record|null, $samplingHandler). |
int | $factor | Sample factor (e.g. 10 means every ~10th record is sampled) |