X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ba6fd3dfb0d3241d4ce85fa43cd6e760d17db948..d6c4fb901ad64f828287556a26daab52449dab32:/platforma/settings.py?ds=sidebyside diff --git a/platforma/settings.py b/platforma/settings.py index a116a44a..0fb6518d 100644 --- a/platforma/settings.py +++ b/platforma/settings.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from os import path +import os.path -PROJECT_ROOT = path.realpath(path.dirname(__file__)) +PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__)) DEBUG = False TEMPLATE_DEBUG = DEBUG @@ -221,3 +221,19 @@ try: except ImportError: pass +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 +