protected function getLogFile()
    {
        // disable debug log for this action
        $logger = ShopgateLogger::getInstance();
        $logger->disableDebug();
        $logger->keepDebugLog(true);

        $type  = (empty($this->params['log_type']))
            ? ShopgateLogger::LOGTYPE_ERROR
            : $this->params['log_type'];
        $lines = (!isset($this->params['lines']))
            ? null
            : $this->params['lines'];

        $log = $logger->tail($type, $lines);

        // return the requested log file content and end the script
        if (empty($this->response)) {
            $this->response = new ShopgatePluginApiResponseTextPlain($this->trace_id);
        }
        $this->responseData = $log;
    }