From: Michael Wallner Date: Fri, 16 Dec 2016 09:15:50 +0000 (+0100) Subject: logger: add X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9e35d9e1f6adb610b17e940616cd1dc4ec8aa0d7;p=pharext%2Fpharext.org logger: add --- diff --git a/app/Github/Logger.php b/app/Github/Logger.php deleted file mode 100644 index d90e824..0000000 --- a/app/Github/Logger.php +++ /dev/null @@ -1,22 +0,0 @@ -github->log; - parent::__construct($channel); - foreach ($config->log->$channel as $logger) { - $reflection = new \ReflectionClass("Monolog\\Handler\\" . $logger->handler); - if (!empty($logger->args)) { - $handler = $reflection->newInstanceArgs($logger->args->toArray()); - } else { - $handler = $reflection->newInstance(); - } - $this->pushHandler($handler); - } - } -} diff --git a/app/Logger.php b/app/Logger.php new file mode 100644 index 0000000..51e4803 --- /dev/null +++ b/app/Logger.php @@ -0,0 +1,21 @@ +log->$channel as $logger) { + $reflection = new \ReflectionClass("Monolog\\Handler\\" . $logger->handler); + if (!empty($logger->args)) { + $handler = $reflection->newInstanceArgs($logger->args->toArray()); + } else { + $handler = $reflection->newInstance(); + } + $this->pushHandler($handler); + } + } +}