diff MoinMoin/config/multiconfig.py @ 3157:b8cb12fa571b

logging: using more logging.exception
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 01 Mar 2008 17:10:35 +0100
parents 6749e003d7e2
children 2a3a6cb34e45
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Sat Mar 01 16:41:33 2008 +0100
+++ b/MoinMoin/config/multiconfig.py	Sat Mar 01 17:10:35 2008 +0100
@@ -47,7 +47,7 @@
     except ImportError:
         raise
     except IndentationError, err:
-        logging.error(str(err))
+        logging.exception('Your source code / config file is not correctly indented!')
         msg = '''IndentationError: %(err)s
 
 The configuration files are python modules. Therefore, whitespace is
@@ -58,7 +58,7 @@
 }
         raise error.ConfigurationError(msg)
     except Exception, err:
-        logging.error(str(err))
+        logging.exception('An exception happened.')
         msg = '%s: %s' % (err.__class__.__name__, str(err))
         raise error.ConfigurationError(msg)
     return module, mtime
@@ -118,7 +118,7 @@
         cfg.cfg_mtime = max(mtime, _farmconfig_mtime)
         logging.info("using wiki config: %s" % os.path.abspath(module.__file__))
     except ImportError, err:
-        logging.error(str(err))
+        logging.exception('Could not import.')
         msg = '''ImportError: %(err)s
 
 Check that the file is in the same directory as the server script. If
@@ -134,7 +134,7 @@
 }
         raise error.ConfigurationError(msg)
     except AttributeError, err:
-        logging.error(str(err))
+        logging.exception('An exception occured.')
         msg = '''AttributeError: %(err)s
 
 Could not find required "Config" class in "%(name)s.py".