diff options
author | Joas Schilling <coding@schilljs.com> | 2022-06-29 18:34:46 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-10-27 14:58:09 +0300 |
commit | e4a95c0ade69b69a95b9f93d1290bc4d6ab4b357 (patch) | |
tree | 48c746b14f64b8712bb1d251655d95a48c07aa89 | |
parent | 2546efae175fc4984ef93eba2bd51ebe3ac21e93 (diff) |
Improve email loggingbackport/832/stable23
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/MailQueueHandler.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/MailQueueHandler.php b/lib/MailQueueHandler.php index 9d6d89a3..013c3bd8 100644 --- a/lib/MailQueueHandler.php +++ b/lib/MailQueueHandler.php @@ -164,11 +164,11 @@ class MailQueueHandler { if ($this->sendEmailToUser($user, $email, $language, $timezone, $sendTime)) { $deleteItemsForUsers[] = $user; } else { - $this->logger->debug("Failed sending activity email to user '{user}'.", ['user' => $user, 'app' => 'activity']); + $this->logger->warning("Failed sending activity email to user '{user}'.", ['user' => $user, 'app' => 'activity']); } } catch (\Exception $e) { $this->logger->logException($e, [ - 'message' => 'Failed sending activity email to user "{user}"', + 'message' => 'Failed creating activity email for user "{user}"', 'user' => $user, 'app' => 'activity', ]); @@ -405,6 +405,11 @@ class MailQueueHandler { try { $this->mailer->send($message); } catch (\Exception $e) { + $this->logger->logException($e, [ + 'message' => 'Failed sending activity email to user "{user}"', + 'user' => $user, + 'app' => 'activity', + ]); return false; } |