log error status code and message in preview service
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 27 Jun 2017 09:16:12 +0000 (11:16 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 27 Jun 2017 11:35:17 +0000 (13:35 +0200)
Change-Id: I570bdb5fc5550a14806460e15abcf078dbbef8f7
Reviewed-on: http://gerrit.tine20.com/customers/4958
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/FileSystem/Preview/Service.php

index 0085e43..8f6d0a7 100644 (file)
@@ -46,6 +46,9 @@ class Tinebase_FileSystem_Preview_Service implements Tinebase_FileSystem_Preview
             if ((int)$response->getStatus() === 200) {
                 $responseJson = json_decode($response->getBody(), true);
                 break;
+            } else {
+                if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::'
+                    . __LINE__ . ' STATUS CODE: ' . $response->getStatus() . ' MESSAGE: ' . $response->getMessage());
             }
             $run = time() - $lastRun;
             if ($run < 5) {