From eb95ba94fb21ccc5834bd67abefee56fec309aee Mon Sep 17 00:00:00 2001 From: James Laska Date: Thu, 5 Nov 2015 12:06:29 -0500 Subject: [PATCH] Attach handlers to django_auth_ldap To assist with debugging LDAP authentication, associate the 'django_auth_ldap' handler with the 'tower_warnings' logger. To enable debugging, set the following in a tower settings file: > LOGGING['handlers']['tower_warnings']['level'] = 'DEBUG' Also uses the proper `filename` for the tower_warnings log file. --- awx/settings/defaults.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index ac896c2752..2e41172ce0 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -721,7 +721,7 @@ LOGGING = { 'level': 'WARNING', 'class':'logging.handlers.RotatingFileHandler', 'filters': ['require_debug_false'], - 'filename': os.path.join(LOG_ROOT, 'tower_warnings.log'), + 'filename': os.path.join(LOG_ROOT, 'tower.log'), 'maxBytes': 1024 * 1024 * 5, # 5 MB 'backupCount': 5, 'formatter':'simple', @@ -813,7 +813,8 @@ LOGGING = { 'propagate': False, }, 'django_auth_ldap': { - 'handlers': ['null'], + 'handlers': ['console', 'file', 'tower_warnings'], + 'level': 'DEBUG', }, } }