protected function log_message($message, $priority_level = self::LOG_DEBUG)
    {
        if (
            $this->DEBUG &&
            $this->API_DEBUG_HANDLER &&
            is_callable($this->API_DEBUG_HANDLER)
        ) {
            $response = call_user_func($this->API_DEBUG_HANDLER, $message, $priority_level);
        } else {
            $response = error_log($message);
        }

        return $response;
    }