configure the logger, edit the .gitignore file#1243
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your Java implementation is solid — all System.out.println() and e.printStackTrace() statements have been properly replaced with logger calls, and the .gitignore correctly excludes log files. However, the critical missing component is the log4j2.xml configuration file that defines the File and Console appenders. The task explicitly requires configuring the logger with both File and Console appenders, which cannot be accomplished through Java code alone — this must be defined in a configuration file. Please add a log4j2.xml (or log4j2.properties) file to your submission that configures both appenders. Additionally, consider standardizing log message casing across your services for consistency.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution meets all critical requirements for task #1. The log4j2.xml configuration file is present and properly configured with both File and Console appenders. All System.out.println() and e.printStackTrace() statements have been successfully replaced with logger calls, and .gitignore correctly excludes log files. The only remaining issue is a minor style inconsistency in log message casing between files (e.g., "Can't login" vs. "Method login was called..."), which is cosmetic and doesn't affect functionality. Your implementation is solid and complete.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| import mate.academy.model.User; | ||
| import org.apache.logging.log4j.LogManager; | ||
| import org.apache.logging.log4j.Logger; | ||
|
|
There was a problem hiding this comment.
The critical missing component for task requirement #1. A Log4j2 configuration file (e.g., log4j2.xml or log4j2.properties) must be added to define both File and Console appenders. Without this file, the logger won't know where to output logs.
No description provided.