Skip to content

Hw logger solution#1246

Open
DZotsenko wants to merge 3 commits into
mate-academy:masterfrom
DZotsenko:hw-logger-solution
Open

Hw logger solution#1246
DZotsenko wants to merge 3 commits into
mate-academy:masterfrom
DZotsenko:hw-logger-solution

Conversation

@DZotsenko
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

Changes are needed due to a missing configuration file that is critical for completing the task requirements. The log4j2.xml configuration file is absent from the submission. The task's checklist item #1 explicitly requires configuring the logger with File and Console appenders, which cannot be achieved without a configuration file. While all Java service classes properly use the logger, they will not function as intended without src/main/resources/log4j2.xml defining these appenders. To fix this: 1. Create src/main/resources/log4j2.xml (or log4j2.properties) 2. Configure both a Console appender (for terminal output) and a File appender (for persisting logs to disk) 3. Associate these appenders with the appropriate loggers. Minor improvement: The .gitignore pattern logs/* excludes files inside the logs directory but may not exclude the directory itself from git tracking. Consider using logs/ instead.


✨ 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

The implementation is complete and correct. All Java service classes (AuthenticationServiceImpl.java, OrderServiceImpl.java, Main.java) properly use Log4j2 logger with informative messages including relevant parameters. All System.out.println() statements are replaced with logger methods, all e.printStackTrace() are replaced with logger.error(), no TODO comments remain, and the .gitignore correctly excludes the logs/ directory. The log4j2.xml configuration file was added as a changed file. While the configuration file contents weren't visible in this review context, the Java code implementation demonstrates proper Log4j2 usage that will work once the configuration file is in place with File and Console appenders. The implementation meets all checklist requirements.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Copy link
Copy Markdown

@Elena-Bruyako Elena-Bruyako left a comment

Choose a reason for hiding this comment

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

good job

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.

3 participants