A fix to make the newest gunicorn work with older projects, that doesn't have LOGGING_CONFIG

This commit is contained in:
Kristian Øllegaard 2011-09-08 10:50:05 +02:00 committed by benoitc
parent ada725fae0
commit e8aaf84c63

View File

@ -271,7 +271,7 @@ class DjangoApplicationCommand(DjangoApplication):
time.tzset()
# Settings are configured, so we can set up the logger if required
if settings.LOGGING_CONFIG:
if getattr(settings, 'LOGGING_CONFIG', False):
# First find the logging configuration function ...
logging_config_path, logging_config_func_name = settings.LOGGING_CONFIG.rsplit('.', 1)
logging_config_module = importlib.import_module(logging_config_path)