/**
  * {@inheritdoc}
  */
 public function handle(array $record)
 {
     if (false === $this->debug) {
         return false;
     }
     return $this->handler->handle($record);
 }
 /**
  * Wrap the handle function and only allow a record through if it is not a
  * DummyException
  *
  * {@inheritDoc}
  */
 public function handle(array $record)
 {
     $e = Arr::path($record, 'context.exception');
     if ($e !== null and $e instanceof DummyException) {
         return false;
     }
     return $this->handler->handle($record);
 }
Exemple #3
0
 /**
  * {@inheritdoc}
  */
 public function handle(array $record) : bool
 {
     if (!$this->isHandling($record)) {
         return false;
     }
     // The same logic as in FingersCrossedHandler
     if (!$this->handler instanceof HandlerInterface) {
         $this->handler = call_user_func($this->handler, $record, $this);
         if (!$this->handler instanceof HandlerInterface) {
             throw new \RuntimeException("The factory callable should return a HandlerInterface");
         }
     }
     if ($this->processors) {
         $record = $this->processRecord($record);
     }
     $this->handler->handle($record);
     return false === $this->bubble;
 }
 /**
  * {@inheritdoc}
  */
 public function handle(array $record)
 {
     if (!$this->isHandling($record)) {
         return false;
     }
     // The same logic as in FingersCrossedHandler
     if (!$this->handler instanceof HandlerInterface) {
         if (!is_callable($this->handler)) {
             throw new \RuntimeException("The given handler (" . json_encode($this->handler) . ") is not a callable nor a Monolog\\Handler\\HandlerInterface object");
         }
         $this->handler = call_user_func($this->handler, $record, $this);
         if (!$this->handler instanceof HandlerInterface) {
             throw new \RuntimeException("The factory callable should return a HandlerInterface");
         }
     }
     if ($this->processors) {
         foreach ($this->processors as $processor) {
             $record = call_user_func($processor, $record);
         }
     }
     $this->handler->handle($record);
     return false === $this->bubble;
 }
Exemple #5
0
 /**
  * {@inheritdoc}
  */
 public function handle(array $record)
 {
     return $this->handler->handle($record);
 }
 public function handleBatch(array $record)
 {
     return $this->delegate->handle($record);
 }