Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A4214EC57 for ; Wed, 29 May 2013 17:28:42 +0000 (UTC) Received: (qmail 67339 invoked by uid 500); 29 May 2013 17:28:42 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 67322 invoked by uid 500); 29 May 2013 17:28:42 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 67304 invoked by uid 99); 29 May 2013 17:28:42 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 May 2013 17:28:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E261589CD8A; Wed, 29 May 2013 17:28:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [#4994] Added more logging when sending notifications for debugging Date: Wed, 29 May 2013 17:28:41 +0000 (UTC) Updated Branches: refs/heads/cj/4994 7ab6dc9fd -> 488c5335b [#4994] Added more logging when sending notifications for debugging Signed-off-by: Cory Johns 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 Authored: Wed May 29 17:28:25 2013 +0000 Committer: Cory Johns 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)