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();