Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Debugging, logging and errors

The Exponential counterparts of the Symfony profiler, Laravel Telescope and Debugbar, Django Debug Toolbar and framework loggers - debug output and the Exp debug bar, template path comments, eZDebug and eZLog, the log…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/web-framework-developers/debugging-logging-and-errors.md

On this page

Debugging, logging and errors

This page is for developers who rely on a profiler toolbar and a PSR-3 logger. Exponential has its own debug output, turned into a pinned debug bar, its own logging calls, and an administration page that reads the logs (Debugging and logs).

Contents

  1. Debug output and the debug bar
  2. Writing debug and log lines
  3. The log files
  4. From an error page to the log line
  5. Debugging under Velocity
  6. Compared with other frameworks

Debug output and the debug bar

# settings/override/site.ini.append.php, or the dev variant of it (development only)
[DebugSettings]
DebugOutput=enabled

[TemplateSettings]
ShowTemplatePathComments=enabled

The debug bar shows queries, templates used, settings, timings and caches for the page, and has controls for the debug settings and the caches (Exp debug bar). It can be shown to your own address only. Template path comments print which file wrote which markup (Template path comments). Never enable debug output on a production siteaccess for everyone; it shows internals. Put it in the dev variant of your settings (Environments and secrets).

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. These are not PSR-3 loggers; if you use Monolog in your extension, it writes its own files. Never log passwords, keys, tokens or personal data.

The log files

FileHolds
var/log/error.log, warning.logerrors and warnings
var/log/security.logsecurity events
var/log/csp.logContent Security Policy reports
var/log/requestrules.logthe log action of request rules
your own *.logwhat 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). Security-relevant actions belong in the audit trail (Audit trail). In a multisite installation the log paths can differ per site (Multi-site log and cache paths).

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). The first page for any problem is When something goes wrong.

Debugging under Velocity

  • Workers keep classes and settings in memory: after a change, ./console exp:velocity deploy (or restart), or you are debugging old code.
  • Compare with PHP's built-in server engine (--engine=php), which runs each request fresh, when you suspect state kept between requests (Velocity engines).
  • Never wrap eZExecution::cleanExit() in catch ( Exception $e ): under Velocity it ends the request with an exception.

Compared with other frameworks

FrameworkToolExponential
Symfonyweb profiler, Monologdebug bar, eZDebug, eZLog, Setup > Logs
LaravelDebugbar, Telescope, Log::the same
DjangoDebug Toolbar, loggingthe same
Railslogs, byebugthe same; Xdebug works as in any PHP project
SpringActuator, SLF4JSetup > System information, request logs

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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x