Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > logging module: passing more args to the smtp handler?

Thread Tools

logging module: passing more args to the smtp handler?

Andreas Jung
Posts: n/a
I have something like

reason = '....'
mylogger.critical('error with', exc_info=sys.exc_info())

my logginer.ini contains:

args=('localhost', '(E-Mail Removed)', 'my subject')

Is there a way to pass the 'reason' var to the Logger in order
to be emitted as body of the mail?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
forwarding Args&&... vs forwarding Args... Andrew Tomazos C++ 5 01-05-2012 11:15 PM
C++0x -- fun(Args&...) and fun(Args const&...) er C++ 2 12-20-2010 07:52 PM
Is there a class or method to construct url args or extract url args? Ken Varn ASP .Net 2 06-22-2005 12:26 PM
args v. *args passed to: os.path.join() Pierre Fortin Python 2 09-18-2004 06:59 PM
When passing functions as args,how to pass extra args for passed function? Python 3 09-17-2003 12:25 AM