Articles on: Maintenance

How to enable logging - Generating Log Files for Support

When troubleshooting issues, our support staff may ask you to provide a log file. These logs help us identify errors, failed requests, or other important system activity.
Follow the steps below to enable logging and generate a log file:

โš™๏ธ How to Enable Logging in Clientexec



Open your config.php file, located in the root directory of your Clientexec installation.
Edit the following two lines:

define('LOG_LEVEL', 4);
define('LOG_TEXTFILE', '/home/user/logs/ce.log');


๐Ÿ”’ Important:
Use quotes around the file path for LOG_TEXTFILE.
Make sure the specified file exists and is writable by the web server.
Do not place the log file in your web root directory (e.g., public_html) โ€” it may contain sensitive data like passwords.

๐Ÿ”ข Logging Levels (0โ€“6)



Use a number between 0 and 6 for LOG_LEVEL. (Though generally our support staff will ask you to set it to level 4). Each level logs additional details:
0 โ€“ No logging
1 โ€“ Security attack 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)

๐Ÿงช Reproducing the Problem



To generate a useful log file:
Set the appropriate LOG_LEVEL (usually 4, or 5 for SMTP issues)
Reproduce the problem
Disable logging afterward by resetting the config.php lines to:

define('LOG_LEVEL', 1);
define('LOG_TEXTFILE', false);


๐Ÿ“ค Submitting Logs to Support



Use log level 4 for most issues
Use log level 5 for SMTP/email problems
Attach the generated log file to your support ticket and then you can delete the log file.

Updated on: 14/06/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!