Manage null default state for logging integration and DB definition

This commit is contained in:
AlanCoding
2016-12-02 16:45:27 -05:00
parent ebff4f4f24
commit 064a40ba92
6 changed files with 31 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ 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
@@ -36,6 +37,13 @@ def unused_callback(sess, resp):
pass
class HTTPSNullHandler(NullHandler):
"Placeholder null handler to allow loading without database access"
def __init__(self, host, **kwargs):
return super(HTTPSNullHandler, self).__init__()
class HTTPSHandler(logging.Handler):
def __init__(self, fqdn=False, **kwargs):
super(HTTPSHandler, self).__init__()