added isDebugLoggingEnabled()

This commit is contained in:
Roland Gruber 2017-10-29 11:33:07 +01:00
parent 4cb8aec794
commit 57c169e700
1 changed files with 11 additions and 0 deletions

View File

@ -208,6 +208,17 @@ function logoffAndBackToLoginPage() {
die();
}
/**
* Returns if debug messages are to be logged.
*
* @return boolean debug enabled
*/
function isDebugLoggingEnabled() {
if (isset($_SESSION['cfgMain'])) $cfg = $_SESSION['cfgMain'];
else $cfg = new LAMCfgMain();
return $cfg->logLevel >= LOG_DEBUG;
}
/**
* Puts a new message in the log file.
*