{"record":{"id":"915fa514a03ce50a","repo":"Seldaek/monolog","slug":"the-uid-length-must-be-an-integer-between-1-and-32","errorCode":null,"errorMessage":"The uid length must be an integer between 1 and 32","messagePattern":"The uid length must be an integer between 1 and 32","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Processor/UidProcessor.php","lineNumber":33,"sourceCode":"use Monolog\\LogRecord;\n\n/**\n * Adds a unique identifier into records\n *\n * @author Simon Mönch <sm@webfactory.de>\n */\nclass UidProcessor implements ProcessorInterface, ResettableInterface\n{\n    /** @var non-empty-string */\n    private string $uid;\n\n    /**\n     * @param int<1, 32> $length\n     */\n    public function __construct(int $length = 7)\n    {\n        if ($length > 32 || $length < 1) {\n            throw new \\InvalidArgumentException('The uid length must be an integer between 1 and 32');\n        }\n\n        $this->uid = $this->generateUid($length);\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function __invoke(LogRecord $record): LogRecord\n    {\n        $record->extra['uid'] = $this->uid;\n\n        return $record;\n    }\n\n    public function getUid(): string\n    {\n        return $this->uid;","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Processor/UidProcessor.php#L15-L51","documentation":"Error \"The uid length must be an integer between 1 and 32\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Processor/UidProcessor.php:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}