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 --- settings/Controller/UsersController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'settings/Controller') diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php index 53ffd62a06d..af5aff8371d 100644 --- a/settings/Controller/UsersController.php +++ b/settings/Controller/UsersController.php @@ -487,7 +487,11 @@ class UsersController extends Controller { $emailTemplate = $this->newUserMailHelper->generateTemplate($user, $generatePasswordResetToken); $this->newUserMailHelper->sendMail($user, $emailTemplate); } catch (\Exception $e) { - $this->log->error("Can't send new user mail to $email: " . $e->getMessage(), ['app' => 'settings']); + $this->log->logException($e, [ + 'message' => "Can't send new user mail to $email", + 'level' => \OCP\Util::ERROR, + 'app' => 'settings', + ]); } } // fetch users groups -- cgit v1.2.3