I have a question on how to configure my python logger. Below you can see my current set up of the logger. (http://docs.python.org/2/howto/logging-cookbook.html)
logger = logging.getLogger("someName") logger.setLevel(logging.DEBUG) fh = logging.FileHandler("./log/log.out", "w") fh.setLevel(logging.DEBUG) ch = logging.StreamHandler(sys.stderr) ch.setLevel(logging.ERROR) frm = logging.Formatter('%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s','H:%M:%S') fh.setFormatter(frm) ch.setFormatter(frm) logger.addHandler(fh) logger.addHandler(ch) Is there a way to configure the logger in such a way that it also writes error messages like the one below:
print a >>> NameError: global name 'a' is not defined Thanks a lot for your help.