diff options
author | Tim Dettrick <t.dettrick@uq.edu.au> | 2015-09-04 11:40:23 +1000 |
---|---|---|
committer | Tim Dettrick <t.dettrick@uq.edu.au> | 2015-09-14 11:12:52 +1000 |
commit | 1b582ba66b74c7b5ade4560e8af234d1005089d6 (patch) | |
tree | bfdcdc5ae7442698e5faf901e43e30c603810717 /apps/files_external/lib/swift.php | |
parent | c15ba0d6589863e546df2476778fbd305d0c3fdd (diff) | |
download | nextcloud-server-1b582ba66b74c7b5ade4560e8af234d1005089d6.tar.gz nextcloud-server-1b582ba66b74c7b5ade4560e8af234d1005089d6.zip |
Don't log expected Swift 404 responses
File existence checks are expected in some cases to be false, so passing
404 Not Found errors through to the logs just causes noise.
Diffstat (limited to 'apps/files_external/lib/swift.php')
-rw-r--r-- | apps/files_external/lib/swift.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 6f93f3c84cd..2e286965a2b 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -105,7 +105,10 @@ class Swift extends \OC\Files\Storage\Common { $this->getContainer()->getPartialObject($path); return true; } catch (ClientErrorResponseException $e) { - \OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR); + // Expected response is "404 Not Found", so only log if it isn't + if ($e->getResponse()->getStatusCode() !== 404) { + \OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR); + } return false; } } |