瀏覽代碼

Merge pull request #1512 from perevoshchikov/fix/handler-wrapper

Adds return value in handler wrapper
Jordi Boggiano 5 年之前
父節點
當前提交
5881690949
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Monolog/Handler/HandlerWrapper.php

+ 2 - 0
src/Monolog/Handler/HandlerWrapper.php

@@ -108,6 +108,8 @@ class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, F
     {
         if ($this->handler instanceof FormattableHandlerInterface) {
             $this->handler->setFormatter($formatter);
+
+            return $this;
         }
 
         throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class);