Improve exception logging a bit more. Now it always dumps a traceback. Ref: #1717, #1718.

This commit is contained in:
Ionel Cristian Mărieș 2015-05-17 16:34:50 +03:00
commit b173f41bc7

View file

@ -447,7 +447,7 @@ def main():
logger.critical('Internal failure: %r', e, exc_info=True)
raise
logger.warning(
'Caught exception "%s". Reloading.', e)
'Caught exception "%s". Reloading.', e, exc_info=True)
finally:
time.sleep(.5) # sleep to avoid cpu load
@ -462,7 +462,7 @@ def main():
pelican.run()
except Exception as e:
logger.critical('%s', e)
logger.critical('Internal failure: %r', e, exc_info=True)
if args.verbosity == logging.DEBUG:
raise