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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -