stop using Django NullHandler which is being removed in future version

This commit is contained in:
AlanCoding
2017-02-09 11:53:51 -05:00
parent 1851276b10
commit 1c6f037076
2 changed files with 4 additions and 5 deletions

View File

@@ -14,7 +14,6 @@ from requests_futures.sessions import FuturesSession
# custom # custom
from django.conf import settings as django_settings from django.conf import settings as django_settings
from django.utils.log import NullHandler
# AWX external logging handler, generally designed to be used # AWX external logging handler, generally designed to be used
# with the accompanying LogstashHandler, derives from python-logstash library # with the accompanying LogstashHandler, derives from python-logstash library
@@ -38,7 +37,7 @@ def unused_callback(sess, resp):
pass pass
class HTTPSNullHandler(NullHandler): class HTTPSNullHandler(logging.NullHandler):
"Placeholder null handler to allow loading without database access" "Placeholder null handler to allow loading without database access"
def __init__(self, host, **kwargs): def __init__(self, host, **kwargs):

View File

@@ -893,16 +893,16 @@ LOGGING = {
'formatter': 'simple', 'formatter': 'simple',
}, },
'null': { 'null': {
'class': 'django.utils.log.NullHandler', 'class': 'logging.NullHandler',
}, },
'file': { 'file': {
'class': 'django.utils.log.NullHandler', 'class': 'logging.NullHandler',
'formatter': 'simple', 'formatter': 'simple',
}, },
'syslog': { 'syslog': {
'level': 'WARNING', 'level': 'WARNING',
'filters': ['require_debug_false'], 'filters': ['require_debug_false'],
'class': 'django.utils.log.NullHandler', 'class': 'logging.NullHandler',
'formatter': 'simple', 'formatter': 'simple',
}, },
'http_receiver': { 'http_receiver': {