{"record":{"id":"53571c4a85bde9e6","repo":"Seldaek/monolog","slug":"the-curl-extension-is-needed-to-use-the-logglyhand","errorCode":null,"errorMessage":"The curl extension is needed to use the LogglyHandler","messagePattern":"The curl extension is needed to use the LogglyHandler","errorType":"exception","errorClass":"MissingExtensionException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/LogglyHandler.php","lineNumber":53,"sourceCode":"     *\n     * @var CurlHandle[]\n     */\n    protected array $curlHandlers = [];\n\n    protected string $token;\n\n    /** @var string[] */\n    protected array $tag = [];\n\n    /**\n     * @param string $token API token supplied by Loggly\n     *\n     * @throws MissingExtensionException If the curl extension is missing\n     */\n    public function __construct(string $token, int|string|Level $level = Level::Debug, bool $bubble = true)\n    {\n        if (!\\extension_loaded('curl')) {\n            throw new MissingExtensionException('The curl extension is needed to use the LogglyHandler');\n        }\n\n        $this->token = $token;\n\n        parent::__construct($level, $bubble);\n    }\n\n    /**\n     * Loads and returns the shared curl handler for the given endpoint.\n     */\n    protected function getCurlHandler(string $endpoint): CurlHandle\n    {\n        if (!\\array_key_exists($endpoint, $this->curlHandlers)) {\n            $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint);\n        }\n\n        return $this->curlHandlers[$endpoint];\n    }","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/LogglyHandler.php#L35-L71","documentation":"Error \"The curl extension is needed to use the LogglyHandler\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/LogglyHandler.php:53 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"}