From d81755f8c599a00f7d9b17126e23e25a9a2f5194 Mon Sep 17 00:00:00 2001 From: Kipchirchir Sigei Date: Thu, 21 Sep 2023 12:33:29 +0300 Subject: [PATCH] Log auth details during debugging Signed-off-by: Kipchirchir Sigei --- onadata/libs/authentication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onadata/libs/authentication.py b/onadata/libs/authentication.py index 208174f63a..fea4284aa6 100644 --- a/onadata/libs/authentication.py +++ b/onadata/libs/authentication.py @@ -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( @@ -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 "