diff options
author | Stefan Giehl <stefan@piwik.org> | 2016-07-03 23:45:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-03 23:45:06 +0300 |
commit | 7e5d7148e91514a192c11ea2b5a94097de63b557 (patch) | |
tree | b9819cdc48b9995672d630e158bc824809aaff09 | |
parent | 6eef4c857a09d4d16d5827e77d1511af6fd61fb6 (diff) | |
parent | c1e78b3bc7133414e64334b7b781268a47f6d938 (diff) |
Merge pull request #10189 from piwik/archive_logs
Tweak core:archive output logging to better explain where to find error log depending on server configuration
-rw-r--r-- | core/CronArchive.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index 77c9614877..5b2472b75c 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -969,7 +969,13 @@ class CronArchive { $message = "Got invalid response from API request: $url. "; if (empty($response)) { - $message .= "The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details."; + $message .= "The response was empty. This usually means a server error. A solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. "; + + if($this->makeCliMulti()->supportsAsync()) { + $message .= " For more information and the error message please check in your PHP CLI error log file. As this core:archive command triggers PHP processes over the CLI, you can find where PHP CLI logs are stored by running this command: php -i | grep error_log"; + } else { + $message .= " For more information and the error message please check your web server's error Log file. As this core:archive command triggers PHP processes over HTTP, you can find the error message in your Piwik's web server error logs. "; + } } else { $message .= "Response was '$response'"; } @@ -1092,7 +1098,7 @@ class CronArchive $listSiteIds = implode(',', $siteIds); try { - $this->logger->info('Will invalidate archived reports for ' . $date . ' for following websites ids: ' . $listSiteIds); + $this->logger->info('- Will invalidate archived reports for ' . $date . ' for following websites ids: ' . $listSiteIds); $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($siteIds, $date); } catch (Exception $e) { $this->logger->info('Failed to invalidate archived reports: ' . $e->getMessage()); |