Skip to content

configure the logger, edit the .gitignore file#1243

Open
polina-kirf wants to merge 2 commits into
mate-academy:masterfrom
polina-kirf:master
Open

configure the logger, edit the .gitignore file#1243
polina-kirf wants to merge 2 commits into
mate-academy:masterfrom
polina-kirf:master

Conversation

@polina-kirf
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

import mate.academy.model.User;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants