+try:
+ LOGGING_CONFIG_FILE
+except NameError:
+ LOGGING_CONFIG_FILE = os.path.join(PROJECT_ROOT,
+ ('logging.cfg' if not DEBUG else 'logging.cfg.dev'))
+
+try:
+ import logging
+ import logging.config
+
+ logging.config.fileConfig(LOGGING_CONFIG_FILE)
+except ImportError, exc:
+ import traceback
+ traceback.print_exc()
+ raise
+