logging module: passing more args to the smtp handler?
Andreas Jung
lists at andreas-jung.com
Mon Sep 1 04:34:51 EDT 2003
I have something like
try:
do_something_evil()
except:
reason = '....'
mylogger.critical('error with', exc_info=sys.exc_info())
my logginer.ini contains:
[handler_smtp]
...
level=CRITICAL
args=('localhost', 'aj at bla.org', 'my subject')
Is there a way to pass the 'reason' var to the Logger in order
to be emitted as body of the mail?
-aj
More information about the Python-list
mailing list