added Logger to project#1232
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! The services are well-implemented. However, a couple of changes are needed before this can be approved.
The main issue is in the .gitignore file. The current entry for the logs directory is incorrect and will not prevent log files from being committed. Please update it from .logs to logs/ to correctly ignore the entire directory.
Also, the error log message in Main.java is a bit generic. To make it more helpful for debugging, please include the username for which the authentication failed. This will make your log messages more informative as suggested in the task requirements.
Once you've made these adjustments, please submit your solution again. Keep up the great 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
| user = authenticationService.login("bob", "1234"); | ||
| } catch (AuthenticationException e) { | ||
| e.printStackTrace(); | ||
| logger.error("Authentication failed.", e); |
There was a problem hiding this comment.
This log message is a bit generic. To make it more informative as suggested by the checklist, consider including the username for which the authentication failed. You have access to this information right here in the main method.
| @@ -1,3 +1,4 @@ | |||
| .logs/* | |||
There was a problem hiding this comment.
Based on the project's configuration, the log directory is named logs, not .logs. This entry will not ignore the log files as intended. A better way to ignore the entire directory and its contents would be to use logs/.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this update! I'm happy to approve your solution. You've successfully addressed all the feedback from the previous review. The .gitignore file is now correctly configured to ignore the logs directory, and the error messages are much more informative. Your implementation of the logger is clean and meets all the task requirements. Well done!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.