{"record":{"id":"38127d51ef3a5654","repo":"Seldaek/monolog","slug":"invalid-average-system-load-s","errorCode":null,"errorMessage":"Invalid average system load: `%s`","messagePattern":"Invalid average system load: `(.+?)`","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Processor/LoadAverageProcessor.php","lineNumber":44,"sourceCode":"\n    private const AVAILABLE_LOAD = [\n        self::LOAD_1_MINUTE,\n        self::LOAD_5_MINUTE,\n        self::LOAD_15_MINUTE,\n    ];\n\n    /**\n     * @var int\n     */\n    protected $avgSystemLoad;\n\n    /**\n     * @param self::LOAD_* $avgSystemLoad\n     */\n    public function __construct(int $avgSystemLoad = self::LOAD_1_MINUTE)\n    {\n        if (!\\in_array($avgSystemLoad, self::AVAILABLE_LOAD, true)) {\n            throw new \\InvalidArgumentException(sprintf('Invalid average system load: `%s`', $avgSystemLoad));\n        }\n        $this->avgSystemLoad = $avgSystemLoad;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    public function __invoke(LogRecord $record): LogRecord\n    {\n        if (!\\function_exists('sys_getloadavg')) {\n            return $record;\n        }\n        $usage = sys_getloadavg();\n        if (false === $usage) {\n            return $record;\n        }\n\n        $record->extra['load_average'] = $usage[$this->avgSystemLoad];","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Processor/LoadAverageProcessor.php#L26-L62","documentation":"Error \"Invalid average system load: `%s`\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Processor/LoadAverageProcessor.php:44 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"}