You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/05/29 19:28:41 UTC
git commit: [#4994] Added more logging when sending notifications for
debugging
Updated Branches:
refs/heads/cj/4994 7ab6dc9fd -> 488c5335b
[#4994] Added more logging when sending notifications for debugging
Signed-off-by: Cory Johns <cj...@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 <cj...@slashdotmedia.com>
Authored: Wed May 29 17:28:25 2013 +0000
Committer: Cory Johns <cj...@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)