diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-01-23 11:56:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 11:56:02 +0100 |
commit | 4537faa5dabdcb2f0b888baa5031e59099e52d6a (patch) | |
tree | 0295177ddd5f6736739c503131eb75323561b220 /lib/private/Files/Storage | |
parent | 9cb3a79b18bb74e3f79d53aa400d7efa5b2c2174 (diff) | |
parent | 2a38605545e26ce68a37e5ebb877fd9c9875a37d (diff) | |
download | nextcloud-server-4537faa5dabdcb2f0b888baa5031e59099e52d6a.tar.gz nextcloud-server-4537faa5dabdcb2f0b888baa5031e59099e52d6a.zip |
Merge pull request #7918 from nextcloud/properly-log-exceptions
Properly log the full exception instead of only the message
Diffstat (limited to 'lib/private/Files/Storage')
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 3 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index 6585dd862e4..43347aa0b8f 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -830,8 +830,7 @@ class DAV extends Common { * which might be temporary */ protected function convertException(Exception $e, $path = '') { - \OC::$server->getLogger()->logException($e); - Util::writeLog('files_external', $e->getMessage(), Util::ERROR); + \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); if ($e instanceof ClientHttpException) { if ($e->getHttpStatus() === Http::STATUS_LOCKED) { throw new \OCP\Lock\LockedException($path); diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 1ca750f0024..d443ccfd49b 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -441,8 +441,11 @@ class Encryption extends Wrapper { } } } catch (ModuleDoesNotExistsException $e) { - $this->logger->warning('Encryption module "' . $encryptionModuleId . - '" not found, file will be stored unencrypted (' . $e->getMessage() . ')'); + $this->logger->logException($e, [ + 'message' => 'Encryption module "' . $encryptionModuleId . '" not found, file will be stored unencrypted', + 'level' => \OCP\Util::WARN, + 'app' => 'core', + ]); } // encryption disabled on write of new file and write to existing unencrypted file -> don't encrypt |