Seldaek/monolog · error · UnexpectedValueException
The nested handler of type ${class} does not support formatt
Error message
The nested handler of type ${class} does not support formatters. What it means
Error "The nested handler of type ${class} does not support formatters." thrown in Seldaek/monolog.
Source
Thrown at src/Monolog/Handler/BufferHandler.php:151
$this->resetProcessors();
if ($this->handler instanceof ResettableInterface) {
$this->handler->reset();
}
}
/**
* @inheritDoc
*/
public function setFormatter(FormatterInterface $formatter): HandlerInterface
{
if ($this->handler instanceof FormattableHandlerInterface) {
$this->handler->setFormatter($formatter);
return $this;
}
throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.');
}
/**
* @inheritDoc
*/
public function getFormatter(): FormatterInterface
{
if ($this->handler instanceof FormattableHandlerInterface) {
return $this->handler->getFormatter();
}
throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.');
}
public function setHandler(HandlerInterface $handler): void
{
$this->handler = $handler;
}View on GitHub (pinned to 57eb102834)
When it happens
Trigger: Thrown at src/Monolog/Handler/BufferHandler.php:151 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/051420af8bc85e97.
Report an issue: GitHub.