[IMP] email sending: use OpenERP logger instead of logging...
authorChristophe Simonis <christophe@tinyerp.com>
Tue, 28 Apr 2009 13:50:45 +0000 (15:50 +0200)
committerChristophe Simonis <christophe@tinyerp.com>
Tue, 28 Apr 2009 13:50:45 +0000 (15:50 +0200)
bzr revid: christophe@tinyerp.com-20090428135045-qh3h94cv6igneakp

bin/tools/misc.py

index 4dd11c5..8a348d3 100644 (file)
@@ -388,8 +388,8 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
                   )
         s.quit()
     except Exception, e:
-        import logging
-        logging.getLogger().error(str(e))
+        import netsvc
+        netsvc.Logger().notifyChannel('email_send', netsvc.LOG_ERROR, e)
         return False
     return True