Seldaek/monolog · error · InvalidArgumentException

The FlowdockHandler must be configured (via setFormatter) wi

Error message

The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly

What it means

Error "The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly" thrown in Seldaek/monolog.

Source

Thrown at src/Monolog/Handler/FlowdockHandler.php:83

    /**
     * @inheritDoc
     */
    public function setFormatter(FormatterInterface $formatter): HandlerInterface
    {
        if (!$formatter instanceof FlowdockFormatter) {
            throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly');
        }

        return parent::setFormatter($formatter);
    }

    /**
     * Gets the default formatter.
     */
    protected function getDefaultFormatter(): FormatterInterface
    {
        throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly');
    }

    /**
     * @inheritDoc
     */
    protected function write(LogRecord $record): void
    {
        parent::write($record);

        $this->closeSocket();
    }

    /**
     * @inheritDoc
     */
    protected function generateDataStream(LogRecord $record): string
    {
        $content = $this->buildContent($record);

View on GitHub (pinned to 57eb102834)

When it happens

Trigger: Thrown at src/Monolog/Handler/FlowdockHandler.php:83 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/ddb70d845928f8f9. Report an issue: GitHub.