// Set up eZDebug eZDebug::writeDebug('Debug information: ' . $variable); // Output the debug information to the screen eZDebug::printDebug();
// Set up eZDebug $debugLogger = eZLogger::instance('debug'); $debugLogger->setEnabled(true); // Write the debug information to the log eZDebug::writeDebug('Debug information: ' . $variable, $debugLogger);In this example, we are using the eZDebug function `writeDebug` to output some debug information to a log file. We set up a logger using the `eZLogger` class and then pass it into the `writeDebug` function. Package/library: eZ Publish/Core.