{"record":{"id":"2886e355e6659de9","repo":"Seldaek/monolog","slug":"no-formatter-has-been-set-and-this-handler-does-no","errorCode":null,"errorMessage":"No formatter has been set and this handler does not have a default formatter","messagePattern":"No formatter has been set and this handler does not have a default formatter","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/PsrHandler.php","lineNumber":87,"sourceCode":"    }\n\n    /**\n     * Sets the formatter.\n     */\n    public function setFormatter(FormatterInterface $formatter): HandlerInterface\n    {\n        $this->formatter = $formatter;\n\n        return $this;\n    }\n\n    /**\n     * Gets the formatter.\n     */\n    public function getFormatter(): FormatterInterface\n    {\n        if ($this->formatter === null) {\n            throw new \\LogicException('No formatter has been set and this handler does not have a default formatter');\n        }\n\n        return $this->formatter;\n    }\n}\n","sourceCodeStart":69,"sourceCodeEnd":93,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/PsrHandler.php#L69-L93","documentation":"Error \"No formatter has been set and this handler does not have a default formatter\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/PsrHandler.php:87 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"}