Forums | Mahara Community
Support
/
Disable debug mode
22 November 2024, 23:19
Hello,
I'd like to disable the [DBG] loglevel in Mahara. I tried those in the config.php :
$cfg->productionmode = true;
$cfg->developermode = false;
$cfg->log_backtrace_levels = LOG_LEVEL_WARN
I still have DBG messages in my php-fpm log file. For instance on each login :
[22-Nov-2024 11:10:46 Europe/Paris] [DBG] 00 (auth/saml/lib.php:562) remote user 'seclier5' is now reanimated as 'seclier5'
My Mahara version is 24.04.7. Did I missed something ?
Thanks for your help.
Cheers,
25 November 2024, 9:18
Hi Benjamin,
Logging consists of a message and backtrace, so the
log_backtrace_levels
is for the backtrace part
The message part is based on the $cfg->log_*_levels setting where the * is the log type so for debug messages it is 'log_dbg_targets'.
The default for this setting is:
$cfg->log_dbg_targets = LOG_TARGET_ERRORLOG;
So to stop the debug messages appearing in the error log we can set the value to a non-handled bitwise value.
$cfg->log_dbg_targets = 32;
Though it can be useful to have debugging messages to be logged especially for login issues from external systems.
Cheers
Robert
26 November 2024, 22:53
Hello Robert,
Thank you for your answer, it works well !
I agree with you, this kind of message can be useful, but debugging messages are not for production, I leave them on my test instance only.
Cheers,