public function handle(
            int $level,
            string $message,
            string $file = null,
            int $line = null,
            array $context = []
    ): bool
    {
        $logData  = date('Y-m-d H:i:s') . '|' . $level;
        $logData .= '|' . (self::$levelStrings[$level] ?? 'unknown');
        $logData .= '|' . $message;
        $logData .= '|' . $file;
        $logData .= '|' . $line;
        $logDir   = $this->buildLogDir();
        if (!file_exists($logDir)) {
            mkdir($logDir, $this->filemode, true);
        }

        error_log(
                $logData . "\n",
                3,
                $logDir . DIRECTORY_SEPARATOR . 'php-error-' . date('Y-m-d') . '.log'
        );
        return ErrorHandler::STOP_ERROR_HANDLING;
    }