Skip to content

added Logger to project#1232

Open
SvitlanaLychagina wants to merge 2 commits into
mate-academy:masterfrom
SvitlanaLychagina:hw-jv-logger
Open

added Logger to project#1232
SvitlanaLychagina wants to merge 2 commits into
mate-academy:masterfrom
SvitlanaLychagina:hw-jv-logger

Conversation

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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/main/java/mate/academy/Main.java Outdated
user = authenticationService.login("bob", "1234");
} catch (AuthenticationException e) {
e.printStackTrace();
logger.error("Authentication failed.", e);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread .gitignore Outdated
@@ -1,3 +1,4 @@
.logs/*
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/.

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

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! ✨

Footnotes

  1. Rate AI review example

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