def configure_logging(arguments): logfile = arguments.get('--logfile') if logfile: override_logfile = {'handlers': {'file': {'filename': logfile}}} settings.LOGGING = utils.update(settings.LOGGING, override_logfile) logging.config.dictConfig(settings.LOGGING)
'maxBytes': 1024 * 1024 * 10, 'backupCount': 5, 'formatter': 'simple' } }, 'loggers': { 'root': { 'level': 'WARNING', 'handlers': ['console'] }, 'gevent_utils': { 'level': 'DEBUG', 'handlers': ['console'] }, 'harvey': { 'level': 'DEBUG', 'handlers': ['console'] } } } try: from local_settings import * except ImportError: pass if 'LOGGING' not in locals(): LOGGING = {} LOGGING = utils.update(_LOGGING, LOGGING)
'backupCount': 5, 'formatter': 'simple' } }, 'loggers': { 'root': { 'level': 'WARNING', 'handlers': ['console'] }, 'gevent_utils': { 'level': 'DEBUG', 'handlers': ['console'] }, 'harvey': { 'level': 'DEBUG', 'handlers': ['console'] } } } try: from local_settings import * except ImportError: pass if 'LOGGING' not in locals(): LOGGING = {} LOGGING = utils.update(_LOGGING, LOGGING)