Debug Logging

From Sit
Jump to: navigation, search

Error Logging

You can capture errors, warning and verbose debug information about SiT by setting up a log file. This is useful for debugging problems with SiT that may be caused by misconfiguration or by bugs within SiT itself. (From v3.45 and later)

Setting up an error log file is recommended for SiT developers as it helps to catch problems early and to find their cause.

Go to SiT! | Control Panel | Configure and then Application | Other to set Path to an error log file.

Or you can edit your sit config file and add this line:

$CONFIG['error_logfile'] = '/tmp/siterrors.log';

Don't forget to create the log file because SiT! cannot create it itself, and make sure the webserver has write access to it, in a *nix shell with root access, type:

It is recommended to set up log rotation of the log file, else you might end up with a very large log file

touch /tmp/siterrors.log
chown www-data:www-data /tmp/siterrors.log

Where www-data is the webserver user (Ubuntu). Other dists might be apache or www

Info.png Info: The error log file must already exist and be writable by SiT. SiT does not create this file if it doesn't already exist

Debug Mode

For an even more verbose log file, and for certain debugging information to be displayed at the bottom of some pages set:

Go to SiT! | Control Panel | Configure and then Application | Other to set 'Debug Mode' to TRUE.

Or add this line to your config file.

$CONFIG['debug'] = TRUE;
Info.png Tip: Test logging by enabling debug mode and visiting the Help > About page, a message will be output into the log file with the current application version and this will confirm logging works.

See Also

Personal tools
project