Skip to content

Commit

Permalink
Log auth details during debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Kipchirchir Sigei <[email protected]>
  • Loading branch information
KipSigei committed Sep 25, 2023
1 parent 421d9e7 commit d81755f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onadata/libs/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

logger = logging.getLogger("console_logger")
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.INFO)
logger.setLevel(logging.DEBUG)

ENKETO_AUTH_COOKIE = getattr(settings, "ENKETO_AUTH_COOKIE", "__enketo")
TEMP_TOKEN_EXPIRY_TIME = getattr(
Expand Down Expand Up @@ -127,7 +127,7 @@ def authenticate(self, request):
f"IP: {ip_address}, USERNAME: {username}, "
f"REMAINING_ATTEMPTS: {remaining_attempts}, USER_AGENT: {user_agent}"
)
logger.info(info_str)
logger.debug(info_str)
error_str = _(
"Invalid username/password. "
f"For security reasons, after {remaining_attempts} more failed "
Expand Down

0 comments on commit d81755f

Please sign in to comment.