Logging can be helpful for troubleshooting issues or keeping a log of activity.
Booked 3.6.11 and higher #
By default, all logging is disabled.
To turn logging on #
- Open /config/config.php in a text editor
- Locate
$conf['settings']['logging']['log.dir']
(If this setting does not exist, add it) - Set this value to the full or relative directory path where you want the Booked log files written. (This directory must be writable)
- Locate
$conf['settings']['logging']['log.level']
(If this setting does not exist, add it) - Set this value to either
debug
orerror
. Debug level logging will capture diagnostic and informational logs. Error logging will only capture errors. Error is the default and recommended setting. - Save /config/config.php
To turn logging off #
- Open /config/config.php in a text editor
- Locate
$conf['settings']['logging']['log.dir']
- Set this value to a blank string
- Save /config/config.php
Booked 3.6.10 and lower #
Booked uses the log4php library to log multiple levels of information categorized into either application or database logs. By default, logging is turned OFF.
To turn logging on #
- Rename /config/log4php.config.dist.xml to /config/log4php.config.xml
- Set the log directory and file name. Logging options are configured in /config/log4php.config.xml
- For Windows, set the file parameter to something like
<param name="file" value="c:\temp\booked_log_%s.log"/>
- For Unix, set the file parameter to something like
<param name="file" value="/tmp/booked_log_%s.log"/>
- For Windows, set the file parameter to something like
- Logging is controlled by changing the of each <level> of each <logger>
- Levels used by Booked are OFF, DEBUG, ERROR. For normal operation, ERROR is appropriate. If trace logs are needed, DEBUG is appropriate.
- To turn on application logging, change the value to an appropriate level for either the default or sql loggers. For example,
<level value="DEBUG" />
- Ensure the server’s PHP user or group has write access (0755) to your configured log directory
- For more information on logging configuration, visit log4php