Skip to content

Commit

Permalink
Only log if levbel is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
gamma committed Jun 21, 2023
1 parent 00760cd commit a2b2d3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/debug.php
Expand Up @@ -79,6 +79,8 @@ public function message($info,$var=null,$level=4){

$ajaxCanLog = $this->isAJAX && $level == 4;
$fh = false;

if( $this->debugLevel > $level && !$ajaxCanLog ) return; // only log certain Debug Levels

switch($level) {
case 4: $this->logger->error( $info, $var ); break;
Expand All @@ -88,8 +90,6 @@ public function message($info,$var=null,$level=4){
default: $TYPE = " NONE"; break;
}

if( $this->debugLevel > $level && !$ajaxCanLog ) return; // only log certain Debug Levels

if ( empty($this->debugFile) ) {
$this->runtimeException("DebugFile not properly configured. Make sure, it is set, readable and writable. We suggest to use a file in the DokuWiki's media directory.", true);
$this->debugLevel = 5; // shutdown debug
Expand Down

0 comments on commit a2b2d3a

Please sign in to comment.