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 --- apps/files_external/lib/Service/LegacyStoragesService.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/files_external/lib/Service/LegacyStoragesService.php') diff --git a/apps/files_external/lib/Service/LegacyStoragesService.php b/apps/files_external/lib/Service/LegacyStoragesService.php index 68faf0f2854..65880514911 100644 --- a/apps/files_external/lib/Service/LegacyStoragesService.php +++ b/apps/files_external/lib/Service/LegacyStoragesService.php @@ -192,11 +192,11 @@ abstract class LegacyStoragesService { } } catch (\UnexpectedValueException $e) { // don't die if a storage backend doesn't exist - \OCP\Util::writeLog( - 'files_external', - 'Could not load storage: "' . $e->getMessage() . '"', - \OCP\Util::ERROR - ); + \OC::$server->getLogger()->logException($e, [ + 'message' => 'Could not load storage.', + 'level' => \OCP\Util::ERROR, + 'app' => 'files_external', + ]); } } } -- cgit v1.2.3