jv-logger-solution: configure logger, add appenders, add replace todos with loggers#1233
jv-logger-solution: configure logger, add appenders, add replace todos with loggers#1233taraselnik wants to merge 2 commits into
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job on implementing the logger and replacing the standard output calls! Your solution is very close to complete. However, one change is needed to fully meet the requirements.
In AuthenticationServiceImpl.java, the debug message for the login() method should be more informative. Currently, it logs the user ID after the user is found, but for effective debugging, it's better to log the input parameters. This helps trace exactly what the method was called with, which is crucial if an error occurs.
Please update the log message to include the login parameter, as suggested in the checklist [CHECKLIST ITEM #3]. For example: LOGGER.debug("Method login was called. Params: login={}", login);.
Once you make this adjustment, your solution will be perfect. Keep up the excellent work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| public User login(String login, String password) throws AuthenticationException { | ||
| //TODO: add corresponding log message about method login was called | ||
| User user = findByLogin(login); | ||
| LOGGER.debug("Method login was called for user Id {}", user.getUserId()); |
There was a problem hiding this comment.
This violates checklist item #3: 'Let's make our log messages informative'. The example suggests logging the method parameters. It would be more helpful for debugging to log the login parameter here, for instance: LOGGER.debug("Method login was called. Params: login={}", login);.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this task! I am approving your solution. You've successfully addressed all the previous feedback and met every requirement. The transition from standard output to a logger is well-executed, with informative log messages throughout the application. The .gitignore file is also correctly configured. Great job, keep up the fantastic work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.