public function getLogText($addReqResp)
    {
        $action = $this->getActionText();
        $reason = $this->getSendStatusText();
        $message = sprintf($this->t('message_invoice_reason'), $action, $reason);

        if ($this->hasBeenSent() || $this->getSendStatus() === self::NotSent_LocalErrors) {
            if ($this->hasBeenSent()) {
                $message .= ' ' . $this->getStatusText();
            }
            if ($this->hasMessages()) {
                $message .= "\n" . $this->getMessages(Result::Format_FormattedText);
            }
            if ($addReqResp === Result::AddReqResp_Always || ($addReqResp === Result::AddReqResp_WithOther && $this->hasMessages())) {
                $message .= ' ' . $this->getRawRequestResponse(Result::Format_FormattedText);
            }
        }
        return $message;
    }