From 2a38605545e26ce68a37e5ebb877fd9c9875a37d Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 17 Jan 2018 15:21:56 +0100 Subject: Properly log the full exception instead of only the message Signed-off-by: Morris Jobke --- lib/private/Files/View.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/private/Files/View.php') diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 592d4b717ce..fb0b116666e 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1464,12 +1464,11 @@ class View { continue; } catch (\Exception $e) { // sometimes when the storage is not available it can be any exception - \OCP\Util::writeLog( - 'core', - 'Exception while scanning storage "' . $subStorage->getId() . '": ' . - get_class($e) . ': ' . $e->getMessage(), - \OCP\Util::ERROR - ); + \OC::$server->getLogger()->logException($e, [ + 'message' => 'Exception while scanning storage "' . $subStorage->getId() . '"', + 'level' => \OCP\Util::ERROR, + 'app' => 'lib', + ]); continue; } $rootEntry = $subCache->get(''); -- cgit v1.2.3