1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 08:36:33 +02:00

Fix a few details and add docs to the ChannelLevelActivationStrategy, refs #186

This commit is contained in:
Jordi Boggiano
2013-07-17 18:10:31 +02:00
parent e9df30c7f5
commit 050bb52fd8
3 changed files with 26 additions and 5 deletions

View File

@@ -22,6 +22,9 @@ use Monolog\Logger;
* Only requests which actually trigger an error (or whatever your actionLevel is) will be
* in the logs, but they will contain all records, not only those above the level threshold.
*
* You can find the various activation strategies in the
* Monolog\Handler\FingersCrossed\ namespace.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class FingersCrossedHandler extends AbstractHandler
@@ -45,6 +48,8 @@ class FingersCrossedHandler extends AbstractHandler
if (null === $activationStrategy) {
$activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING);
}
// convert simple int activationStrategy to an object
if (!$activationStrategy instanceof ActivationStrategyInterface) {
$activationStrategy = new ErrorLevelActivationStrategy($activationStrategy);
}