From c0d6849277276b6e5181cffa927c302c35db1940 Mon Sep 17 00:00:00 2001 From: yf <291323003@qq.com> Date: Tue, 15 Jan 2019 23:03:56 +0800 Subject: [PATCH] 3.1.10 --- src/Logger.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Logger.php b/src/Logger.php index 70acf29e..cb06ae7e 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -41,14 +41,17 @@ public function logWithLocation(string $str,$logCategory = 'default',int $timest return $this->log($str,$logCategory); } - public function console(string $str, $category = null, $saveLog = true):?string + public function console(string $str, $category = 'console', $saveLog = true):?string { // TODO: Implement console() method. - $str = $this->logger->console($str,$category,$saveLog); - return $str; + $final = $this->logger->console($str,$category,false); + if($saveLog){ + $this->log($str,$category); + } + return $final; } - public function consoleWithLocation(string $str, $category = null, $saveLog = true):?string + public function consoleWithLocation(string $str, $category = 'console', $saveLog = true):?string { // TODO: Implement console() method. $location = $this->getLocation();