Skip to content

Commit

Permalink
Always log stack traces regardless of whether log-debug is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Sep 9, 2017
1 parent 8761256 commit 7f5d8cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pocketmine/utils/MainLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 7f5d8cc

Please sign in to comment.