Debugging and logs
This page is for application creators who need to see inside a request. Exponential has a debug output and debug bar for development, log files for everything, and an error reference that links what a user sees to the log line.
Contents
- Debug output and the debug bar
- Writing debug and log lines
- The log files
- From an error page to the log line
- Debugging under Velocity
Debug output and the debug bar
On a development machine:
# settings/override/site.ini.append.php (development only)
[DebugSettings]
DebugOutput=enabled
[TemplateSettings]
ShowTemplatePathComments=enabledThe debug bar shows queries, templates used, settings, timings and caches for the page (Exp debug bar, Debug bar). Template path comments show which file wrote which markup (Template path comments). Never enable debug output on a production siteaccess; it can show internals.
Writing debug and log lines
eZDebug::writeNotice( 'Imported 12 items', __METHOD__ );
eZDebug::writeWarning( 'Item 42 had no title', __METHOD__ );
eZDebug::writeError( 'Feed could not be read: ' . $message, __METHOD__ );
eZLog::write( 'archive sent for object ' . (int)$objectID, 'expdemo.log' );Warnings and errors go to var/log/warning.log and var/log/error.log whatever the debug setting; eZLog::write()
writes a log of your own in the log directory. Never log passwords, keys, tokens or personal data.
The log files
| File | Holds |
|---|---|
var/log/error.log, warning.log | errors and warnings |
var/log/csp.log | Content Security Policy reports |
var/log/security.log | security events |
your own *.log | what your code writes |
Setup > Logs shows them with a digest of repeated messages (Log viewer); logs rotate (Log rotation). Request logs record requests with timings (Request logs).
From an error page to the log line
Error pages carry a reference; search the logs for it to find the full message (Finding an error by its reference).
Debugging under Velocity
- Workers keep classes and settings in memory: after a change,
exp:velocity deploy(orrestart), or you debug old code. - The server's own logs are under
var/vc/qbix/run/and the configured log directory (8.3.12 Logs). - Compare with PHP's built-in server (
--engine=php), which runs each request fresh, when you suspect state kept between requests (Velocity persistent worker server).
Related pages
- Testing applications
- Debug output improvements
- When something goes wrong
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.