diff --git a/src/pocketmine/utils/MainLogger.php b/src/pocketmine/utils/MainLogger.php index 686f68344de..8e97d61041d 100644 --- a/src/pocketmine/utils/MainLogger.php +++ b/src/pocketmine/utils/MainLogger.php @@ -105,8 +105,8 @@ public function info($message){ $this->send($message, \LogLevel::INFO, "INFO", TextFormat::WHITE); } - public function debug($message){ - if($this->logDebug === false){ + public function debug($message, bool $force = false){ + if($this->logDebug === false and !$force){ return; } $this->send($message, \LogLevel::DEBUG, "DEBUG", TextFormat::GRAY); @@ -156,7 +156,7 @@ public function logException(\Throwable $e, $trace = null){ $errfile = \pocketmine\cleanPath($errfile); $this->log($type, get_class($e) . ": \"$errstr\" ($errno) in \"$errfile\" at line $errline"); foreach(\pocketmine\getTrace(0, $trace) as $i => $line){ - $this->debug($line); + $this->debug($line, true); } }