Log exceptions using the ''exception'' log level/function

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8037 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2009-08-22 13:24:35 +00:00 committed by Git SVN Gateway
parent ca83bd9d8f
commit fcaf404d25
1 changed files with 2 additions and 1 deletions

View File

@ -38,13 +38,14 @@ class NewTicketNotification(Component):
implements(ITicketChangeListener)
# ITicketChangeListener methods
def ticket_created(self, ticket):
"""Called when a ticket is created."""
try:
tn = TicketCCNotifyEmail(self.env)
tn.notify(ticket, newticket=True)
except Exception, e:
self.log.error("Failure sending notification on creation of "
self.log.exception("Failure sending notification on creation of "
"ticket #%s: %s", ticket.id, exception_to_unicode(e))
def ticket_changed(self, ticket, comment, author, old_values):