python - What's the way of record traceback info into a file using LOGBOOK -


i'm new python 3rd party logging module logbook. after reading documents provided auther, not find equivalence to:

logging.exception

which record traceback info me.

am missing information docs? , how can implement this?

thanks in advance!

logging.exception convenience method calls .exception method of root logger instance. logbook doesn't seem have such method on module itself, you'll have initialize new logger (in respect, api compatible).

from logbook import logger log = logger('exceptions') try:     raise exception() except:     log.exception() 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -