|
|
@@ -36,6 +36,7 @@ class FingersCrossedHandler extends AbstractHandler
|
|
|
protected $buffer = array();
|
|
|
protected $stopBuffering;
|
|
|
protected $passthruLevel;
|
|
|
+ protected $overrideActivated = false;
|
|
|
|
|
|
/**
|
|
|
* @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler).
|
|
|
@@ -79,6 +80,14 @@ class FingersCrossedHandler extends AbstractHandler
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Manually activate this logger regardless of the activation strategy
|
|
|
+ */
|
|
|
+ public function activate()
|
|
|
+ {
|
|
|
+ $this->overrideActivated = true;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* {@inheritdoc}
|
|
|
*/
|
|
|
@@ -95,7 +104,7 @@ class FingersCrossedHandler extends AbstractHandler
|
|
|
if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) {
|
|
|
array_shift($this->buffer);
|
|
|
}
|
|
|
- if ($this->activationStrategy->isHandlerActivated($record)) {
|
|
|
+ if ($this->overrideActivated || $this->activationStrategy->isHandlerActivated($record)) {
|
|
|
if ($this->stopBuffering) {
|
|
|
$this->buffering = false;
|
|
|
}
|