mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-26 18:38:38 -06:00
Fixes 5194 logger should be initialized elsewhere.
This commit is contained in:
parent
015e25c618
commit
a6acbfa429
@ -136,6 +136,9 @@ class RemoteUserBackend(_RemoteUserBackend):
|
||||
class LDAPBackend:
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
# Enable logging for django_auth_ldap
|
||||
ldap_logger = logging.getLogger('django_auth_ldap')
|
||||
|
||||
try:
|
||||
import ldap
|
||||
from django_auth_ldap.backend import LDAPBackend as LDAPBackend_, LDAPSettings
|
||||
@ -172,9 +175,4 @@ class LDAPBackend:
|
||||
if getattr(ldap_config, 'LDAP_IGNORE_CERT_ERRORS', False):
|
||||
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
||||
|
||||
# Enable logging for django_auth_ldap
|
||||
ldap_logger = logging.getLogger('django_auth_ldap')
|
||||
ldap_logger.addHandler(logging.StreamHandler())
|
||||
ldap_logger.setLevel(logging.DEBUG)
|
||||
|
||||
return obj
|
||||
|
Loading…
Reference in New Issue
Block a user