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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -