Seldaek/monolog · error · InvalidArgumentException
The uid length must be an integer between 1 and 32
Error message
The uid length must be an integer between 1 and 32
What it means
Error "The uid length must be an integer between 1 and 32" thrown in Seldaek/monolog.
Source
Thrown at src/Monolog/Processor/UidProcessor.php:33
use Monolog\LogRecord;
/**
* Adds a unique identifier into records
*
* @author Simon Mönch <sm@webfactory.de>
*/
class UidProcessor implements ProcessorInterface, ResettableInterface
{
/** @var non-empty-string */
private string $uid;
/**
* @param int<1, 32> $length
*/
public function __construct(int $length = 7)
{
if ($length > 32 || $length < 1) {
throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32');
}
$this->uid = $this->generateUid($length);
}
/**
* @inheritDoc
*/
public function __invoke(LogRecord $record): LogRecord
{
$record->extra['uid'] = $this->uid;
return $record;
}
public function getUid(): string
{
return $this->uid;View on GitHub (pinned to 57eb102834)
When it happens
Trigger: Thrown at src/Monolog/Processor/UidProcessor.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/915fa514a03ce50a.
Report an issue: GitHub.