Seldaek/monolog · error · MissingExtensionException

You must have Zend Server installed with Zend Monitor enable

Error message

You must have Zend Server installed with Zend Monitor enabled in order to use this handler

What it means

Error "You must have Zend Server installed with Zend Monitor enabled in order to use this handler" thrown in Seldaek/monolog.

Source

Thrown at src/Monolog/Handler/ZendMonitorHandler.php:33

use Monolog\Formatter\NormalizerFormatter;
use Monolog\Level;
use Monolog\LogRecord;

/**
 * Handler sending logs to Zend Monitor
 *
 * @author  Christian Bergau <cbergau86@gmail.com>
 * @author  Jason Davis <happydude@jasondavis.net>
 */
class ZendMonitorHandler extends AbstractProcessingHandler
{
    /**
     * @throws MissingExtensionException
     */
    public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true)
    {
        if (!\function_exists('zend_monitor_custom_event')) {
            throw new MissingExtensionException(
                'You must have Zend Server installed with Zend Monitor enabled in order to use this handler'
            );
        }

        parent::__construct($level, $bubble);
    }

    /**
     * Translates Monolog log levels to ZendMonitor levels.
     */
    protected function toZendMonitorLevel(Level $level): int
    {
        return match ($level) {
            Level::Debug     => \ZEND_MONITOR_EVENT_SEVERITY_INFO,
            Level::Info      => \ZEND_MONITOR_EVENT_SEVERITY_INFO,
            Level::Notice    => \ZEND_MONITOR_EVENT_SEVERITY_INFO,
            Level::Warning   => \ZEND_MONITOR_EVENT_SEVERITY_WARNING,
            Level::Error     => \ZEND_MONITOR_EVENT_SEVERITY_ERROR,

View on GitHub (pinned to 57eb102834)

When it happens

Trigger: Thrown at src/Monolog/Handler/ZendMonitorHandler.php:33 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Seldaek/monolog@57eb102834 (2026-08-17). Data as JSON: /api/errors/abb10cc9989f6b11. Report an issue: GitHub.