Image&video processing, programming etc
personal public notebook
Logging exceptions with traceback in python
When using logging module one often need to print traceback along with error message.
Solution is:
logger.error('error message', exc_info=True) # for adding traceback to log
Equivalent :
logger. exception('message')
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment