From 1c6f03707646b33c11d9488363e357972207366d Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Thu, 9 Feb 2017 11:53:51 -0500 Subject: [PATCH] stop using Django NullHandler which is being removed in future version --- awx/main/utils/handlers.py | 3 +-- awx/settings/defaults.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/awx/main/utils/handlers.py b/awx/main/utils/handlers.py index c6c0b5defa..89d7e200d9 100644 --- a/awx/main/utils/handlers.py +++ b/awx/main/utils/handlers.py @@ -14,7 +14,6 @@ from requests_futures.sessions import FuturesSession # custom from django.conf import settings as django_settings -from django.utils.log import NullHandler # AWX external logging handler, generally designed to be used # with the accompanying LogstashHandler, derives from python-logstash library @@ -38,7 +37,7 @@ def unused_callback(sess, resp): pass -class HTTPSNullHandler(NullHandler): +class HTTPSNullHandler(logging.NullHandler): "Placeholder null handler to allow loading without database access" def __init__(self, host, **kwargs): diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index cbe05ae83b..9c77b5d381 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -893,16 +893,16 @@ LOGGING = { 'formatter': 'simple', }, 'null': { - 'class': 'django.utils.log.NullHandler', + 'class': 'logging.NullHandler', }, 'file': { - 'class': 'django.utils.log.NullHandler', + 'class': 'logging.NullHandler', 'formatter': 'simple', }, 'syslog': { 'level': 'WARNING', 'filters': ['require_debug_false'], - 'class': 'django.utils.log.NullHandler', + 'class': 'logging.NullHandler', 'formatter': 'simple', }, 'http_receiver': {