allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#4994] Added more logging when sending notifications for debugging
Date Wed, 29 May 2013 17:28:41 GMT
Updated Branches:
  refs/heads/cj/4994 7ab6dc9fd -> 488c5335b


[#4994] Added more logging when sending notifications for debugging

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/488c5335
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/488c5335
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/488c5335

Branch: refs/heads/cj/4994
Commit: 488c5335bfcba66ffd62a516d56de1a1f765956e
Parents: 7ab6dc9
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed May 29 17:28:25 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed May 29 17:28:25 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/notification.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/488c5335/Allura/allura/model/notification.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/notification.py b/Allura/allura/model/notification.py
index 946fea0..f75bfef 100644
--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -237,6 +237,7 @@ class Notification(MappedClass):
     def send_direct(self, user_id):
         user = User.query.get(_id=ObjectId(user_id))
         artifact = self.ref.artifact
+        log.info('Sending direct notification %s to user %s', self._id, user_id)
         # Don't send if user doesn't have read perms to the artifact
         if user and artifact and \
                 not security.has_access(artifact, 'read', user)():
@@ -265,6 +266,7 @@ class Notification(MappedClass):
                     security.has_access(artifact, 'read', user)()
         notifications = filter(perm_check, notifications)
 
+        log.info('Sending digest of notifications [%s] to user %s', ', '.join([n._id for
n in notifications]), user_id)
         if reply_to_address is None:
             reply_to_address = from_address
         text = [ 'Digest of %s' % subject ]
@@ -287,6 +289,7 @@ class Notification(MappedClass):
     @classmethod
     def send_summary(self, user_id, from_address, subject, notifications):
         if not notifications: return
+        log.info('Sending summary of notifications [%s] to user %s', ', '.join([n._id for
n in notifications]), user_id)
         text = [ 'Digest of %s' % subject ]
         for n in notifications:
             text.append('From: %s' % n.from_address)


Mime
View raw message