From f1e8619074c702c153072c2e6ddf98bf9d8ec5e2 Mon Sep 17 00:00:00 2001
From: KronosDP <darrel.danadyaksa19@gmail.com>
Date: Fri, 28 Feb 2025 21:40:41 +0700
Subject: [PATCH] [REFACTOR] Improve logging messages in AuthenticationService
 for clarity

---
 .../authentication/service/AuthenticationService.java         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/safetypin/authentication/service/AuthenticationService.java b/src/main/java/com/safetypin/authentication/service/AuthenticationService.java
index 97c7e5d..ebeb393 100644
--- a/src/main/java/com/safetypin/authentication/service/AuthenticationService.java
+++ b/src/main/java/com/safetypin/authentication/service/AuthenticationService.java
@@ -94,7 +94,7 @@ public class AuthenticationService {
             logger.warn("Login failed: Incorrect password attempt");
             throw new InvalidCredentialsException("Invalid password");
         }
-        logger.info("User logged in: {} at {}", email, java.time.LocalDateTime.now());
+        logger.info("User logged in at {}", java.time.LocalDateTime.now());
         return user;
     }
 
@@ -143,7 +143,7 @@ public class AuthenticationService {
         if (!user.isVerified()) {
             return "Your account is not verified. Please complete OTP verification. You may request a new OTP after 2 minutes.";
         }
-        logger.info("AuthenticationService.postContent :: Content posted: {}", content);
+        logger.info("AuthenticationService.postContent :: Content posted by user with email: {}", email);
         // For demo purposes, we assume the post is successful.
         return "Content posted successfully";
     }
-- 
GitLab