diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-03-12 22:01:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-12 22:01:10 +0100 |
commit | 66173e9b523e801c10945df7b76491cadb82fa20 (patch) | |
tree | ff9b4281ed948b3e5714f32a617266b37ed0beef /apps/files_external | |
parent | fac0a11576874e25141e34749e7bc64a688b2506 (diff) | |
parent | 044d01d0e13330120753077ba2ab3869da11e082 (diff) | |
download | nextcloud-server-66173e9b523e801c10945df7b76491cadb82fa20.tar.gz nextcloud-server-66173e9b523e801c10945df7b76491cadb82fa20.zip |
Merge pull request #8789 from nextcloud/proper-exception-logging
Use proper method to log exceptions
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 24 | ||||
-rw-r--r-- | apps/files_external/lib/config.php | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 459f9b80e12..553e5316333 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -194,7 +194,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { )); $this->testTimeout(); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } @@ -261,7 +261,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { // we reached the end when the list is no longer truncated } while ($objects['IsTruncated']); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } return true; @@ -305,7 +305,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { return IteratorDirectory::wrap($files); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } } @@ -333,7 +333,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { return $stat; } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } } @@ -343,7 +343,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { try { return $this->isRoot($path) || $this->headObject($path . '/'); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } } @@ -363,7 +363,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { return 'dir'; } } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } @@ -389,7 +389,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $this->deleteObject($path); $this->invalidateCache($path); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } @@ -405,7 +405,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { try { return $this->readObject($path); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } case 'w': @@ -483,7 +483,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $this->testTimeout(); } } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } @@ -504,7 +504,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { )); $this->testTimeout(); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } } else { @@ -518,7 +518,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { )); $this->testTimeout(); } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } @@ -591,7 +591,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { unlink($tmpFile); return true; } catch (S3Exception $e) { - \OCP\Util::logException('files_external', $e); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); return false; } } diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 5238eaa42b2..a1e7d12bcae 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -247,7 +247,7 @@ class OC_Mount_Config { throw $e; } } catch (Exception $exception) { - \OCP\Util::logException('files_external', $exception); + \OC::$server->getLogger()->logException($exception, ['app' => 'files_external']); throw $exception; } } |