Methods

Filters logging by sample rate.

__construct($sampleRate) : \Zend\Log\Filter\Priority

Sample rate must be a float number between 0 and 1 included. If 0.5, only half of the values will be logged. If 0.1 only 1 among 10 values will be logged.

Parameters

$sampleRate

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

Returns TRUE to accept the message, FALSE to block it.

filter(array $event) : bool

Parameters

$event

array

event data

Returns

boolAccepted ?

 Properties

 

Sample rate [0-1].

$sampleRate : float