Skip to content

Commit

Permalink
Fix logging details
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Sep 19, 2024
1 parent 406b723 commit 1ba6e0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ def resolve_username(self, username_supplied_by_user):
password=self.lookup_dn_search_password,
)
if not conn:
self.log.error(
f"Failed to bind lookup_dn_search_user '{self.lookup_dn_search_user}'"
)
return (None, None)

search_filter = self.lookup_dn_search_filter.format(
Expand Down Expand Up @@ -415,7 +418,7 @@ def get_connection(self, userdn, password):
auto_bind=auto_bind,
)
except LDAPBindError as e:
self.log.warning(
self.log.debug(
"Failed to bind {userdn}\n{e_type}: {e_msg}".format(
userdn=userdn,
e_type=e.__class__.__name__,
Expand Down

0 comments on commit 1ba6e0f

Please sign in to comment.