--- a/include/functions.inc
+++ b/include/functions.inc
@@ -246,7 +246,7 @@
     if($config instanceOf config){
         $debugLevel = $config->get_cfg_value('core', 'debugLevel');
     }
-    if ($debugLevel && $level){
+    if (intval($debugLevel) & $level){ // Make bitwise AND operation.
         $output= "DEBUG[$level] ";
         if ($function != ""){
             $output.= "($file:$function():$line) - $info: ";
