Seldaek/monolog · error · LogicException

You tried to pop from an empty processor stack.

Error message

You tried to pop from an empty processor stack.

What it means

Error "You tried to pop from an empty processor stack." thrown in Seldaek/monolog.

Source

Thrown at src/Monolog/Logger.php:276

     * @return $this
     */
    public function pushProcessor(ProcessorInterface|callable $callback): self
    {
        array_unshift($this->processors, $callback);

        return $this;
    }

    /**
     * Removes the processor on top of the stack and returns it.
     *
     * @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord)
     * @throws \LogicException If empty processor stack
     */
    public function popProcessor(): callable
    {
        if (0 === \count($this->processors)) {
            throw new \LogicException('You tried to pop from an empty processor stack.');
        }

        return array_shift($this->processors);
    }

    /**
     * @return callable[]
     * @phpstan-return array<ProcessorInterface|(callable(LogRecord): LogRecord)>
     */
    public function getProcessors(): array
    {
        return $this->processors;
    }

    /**
     * Control the use of microsecond resolution timestamps in the 'datetime'
     * member of new records.
     *

View on GitHub (pinned to 57eb102834)

When it happens

Trigger: Thrown at src/Monolog/Logger.php:276 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/88eb24f1f78b8b89. Report an issue: GitHub.