summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-30 19:10:16 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-30 19:10:16 -0400
commit4f6603e2b16a168712f89ef8b6c242a23938de35 (patch)
tree787a7dd07a6f7f4763961c33ae199d1015c5c4aa /app/Model
parent9cdb72681e69620a1f5ac1a2c0532a414641ad44 (diff)
Add debugging log to record the time to send an email
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Notification.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Model/Notification.php b/app/Model/Notification.php
index 5835de54..048b6a39 100644
--- a/app/Model/Notification.php
+++ b/app/Model/Notification.php
@@ -114,6 +114,7 @@ class Notification extends Base
foreach ($users as $user) {
$this->container['logger']->debug('Send email notification to '.$user['username'].' lang='.$user['language']);
+ $start_time = microtime(true);
// Use the user language otherwise use the application language (do not use the session language)
if (! empty($user['language'])) {
@@ -131,6 +132,8 @@ class Notification extends Base
->setTo(array($user['email'] => $user['name'] ?: $user['username']));
$mailer->send($message);
+
+ $this->container['logger']->debug('Email sent in '.round(microtime(true) - $start_time, 6).' seconds');
}
}
catch (Swift_TransportException $e) {