From e6636c04a91ffc92c58cb7ae5d808547ed01ddef Mon Sep 17 00:00:00 2001 From: User Date: Tue, 6 Jun 2023 03:25:24 +0300 Subject: [PATCH] 20230606#1 --- src/App.php | 2 +- src/Logger.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.php b/src/App.php index 559750e..4f4afe4 100644 --- a/src/App.php +++ b/src/App.php @@ -34,7 +34,7 @@ class App extends Main { public function handler(ServerRequestInterface $request, ResponseInterface $response) : ResponseInterface { try{ $this->init($request, $response); - $this->syslogger()->log("routes", "", $this->appRoutes); + $this->syslogger()->dump("routes", $this->appRoutes); foreach ($this->appRoutes as $appRouteKey => $appHandler){ diff --git a/src/Logger.php b/src/Logger.php index 0c57822..541e790 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -114,8 +114,8 @@ class Logger implements LoggerInterface { $level = self::RFC_5424_LEVELS[$level]; } if(!empty((string)$message))$in[] = $message; - if(!empty($context))$in[] = $context; - self::$logs[$level][] = (count($in)==1) ? $in[0] : $in;; + if(!empty($context)) $in[] = $context; + if(isset($in)) self::$logs[$level][] = (count($in)==1) ? $in[0] : $in; } /**