ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Channel and Error level based monolog activation strategy. More...
Public Member Functions | |
__construct ($defaultActionLevel, $channelToActionLevel=array()) | |
isHandlerActivated (array $record) | |
Returns whether the given record activates the handler. More... | |
Private Attributes | |
$defaultActionLevel | |
$channelToActionLevel | |
Channel and Error level based monolog activation strategy.
Allows to trigger activation based on level per channel. e.g. trigger activation on level 'ERROR' by default, except for records of the 'sql' channel; those should trigger activation on level 'WARN'.
Example:
$activationStrategy = new ChannelLevelActivationStrategy( Logger::CRITICAL, array( 'request' => Logger::ALERT, 'sensitive' => Logger::ERROR, ) ); $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy);
Definition at line 36 of file ChannelLevelActivationStrategy.php.
Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::__construct | ( | $defaultActionLevel, | |
$channelToActionLevel = array() |
|||
) |
int | $defaultActionLevel | The default action level to be used if the record's category doesn't match any |
array | $channelToActionLevel | An array that maps channel names to action levels. |
Definition at line 45 of file ChannelLevelActivationStrategy.php.
References Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy\$channelToActionLevel, Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy\$defaultActionLevel, and Monolog\Logger\toMonologLevel().
Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::isHandlerActivated | ( | array | $record | ) |
Returns whether the given record activates the handler.
array | $record |
Implements Monolog\Handler\FingersCrossed\ActivationStrategyInterface.
Definition at line 51 of file ChannelLevelActivationStrategy.php.
References Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy\$defaultActionLevel.
|
private |
Definition at line 39 of file ChannelLevelActivationStrategy.php.
Referenced by Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy\__construct().
|
private |
Definition at line 38 of file ChannelLevelActivationStrategy.php.
Referenced by Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy\__construct(), and Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy\isHandlerActivated().