Просмотр исходного кода

Add getters for handlers/processors, fixes #363

Jordi Boggiano 11 лет назад
Родитель
Сommit
467e30a9c9
1 измененных файлов с 16 добавлено и 0 удалено
  1. 16 0
      src/Monolog/Logger.php

+ 16 - 0
src/Monolog/Logger.php

@@ -172,6 +172,14 @@ class Logger implements LoggerInterface
         return array_shift($this->handlers);
     }
 
+    /**
+     * @return HandlerInterface[]
+     */
+    public function getHandlers()
+    {
+        return $this->handlers;
+    }
+
     /**
      * Adds a processor on to the stack.
      *
@@ -199,6 +207,14 @@ class Logger implements LoggerInterface
         return array_shift($this->processors);
     }
 
+    /**
+     * @return callable[]
+     */
+    public function getProcessors()
+    {
+        return $this->processors;
+    }
+
     /**
      * Adds a log record.
      *