Client portal

How to enable logging?

May 1, 2017     0 comments

Usually the support staff will ask you to provide log files to troubleshoot a problem. Here's how you can create such logs:

In config.php, edit the following lines:

define('LOG_LEVEL', 4);
define('LOG_TEXTFILE', 'ce.log');

We set here 4 as the logging level, but you can put any number between 0 and 5, which have the following meanings:

0: No logging

1: Security attacks attempts, errors and important messages (recommended level)

2: Reserved for debugging (only logs if DEBUG is true in config.php)

3: + Warnings and EventLogs, VIEW/ACTION and Request URIs and URI redirections and POST/COOKIE values

 4. + plugin events, curl requests, some function calls with their parameters, etc.

 5: + include suppressed actions and SMTP traffic.

 6: + Action responses (ajax,serialized,XML (as array)


Remember to put quotes around the file you specified next to LOG_TEXTFILE. You must create this file and give it writing permissions to the user under which your webserver runs. Also, don't put this file under the webserver documents root directory, as it will contain passwords and other sensitive information.

If you're trying to generate a log to send to support to help them diagnose problem, enable logging just before reproducing the problem, and then disable it just after having reproduced the problem, so the log will only show what support needs to know.  
Please use log level 4 when submitting a log to staff.  If you are sending a log about SMTP not working, please use log level 5 instead.

How helpful was this article to you?