From b173f41bc778237f34d3b7d3646e601d8bb8ad87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 17 May 2015 16:34:50 +0300 Subject: [PATCH] Improve exception logging a bit more. Now it always dumps a traceback. Ref: #1717, #1718. --- pelican/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 12da111a..9777f651 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -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