done#1255
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The code has critical issues that must be fixed. First, there's a syntax error in Main.java line 21 with a double semicolon (logger.error(...); ;) that will prevent compilation. Second, OrderServiceImpl.java line 32 uses logger.error() for a successful data fetch operation - this should be logger.info() or logger.debug() as per best practices for log levels. Third, log messages in AuthenticationServiceImpl.java line 13 and OrderServiceImpl.java line 15 are missing required parameters - the checklist explicitly requires informative messages that include actual values (e.g., Params: userId={}). Once the double semicolon is fixed, the code will compile, but these logging quality issues should be addressed before final approval.
✨ 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
| //TODO: add corresponding log message about method login was called | ||
| logger.info("Method login was called. Params = {}", login); | ||
| User user = findByLogin(login); | ||
| if (!user.getPassword().equals(password)) { |
There was a problem hiding this comment.
This log message doesn't include the userId parameter. According to the checklist, log messages must be informative and include parameter values (see good example: Params: login={}). The method takes userId as a parameter, so it should be logged like: logger.info("Method completeOrder was called. Params: userId={}", userId);
| public class Main { | ||
| private static final Logger logger = LogManager.getLogger(Main.class); | ||
|
|
||
| public static void main(String[] args) { |
There was a problem hiding this comment.
The log message is generic. According to checklist item #4, include the userId parameter to make it informative: logger.info("Method completeOrder was called. userId={}", userId);
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation successfully meets all core requirements. All System.out.println() and e.printStackTrace() statements have been properly replaced with logger methods using Log4j2, log messages include actual parameter values as required, and the .gitignore correctly excludes the logs/ directory. There is one minor issue worth fixing: in Main.java line 21, there's a typo in the log message - "Can't aunthificate user" should be "Can't authenticate user". This is a minor cosmetic issue that doesn't block approval, but fixing it will improve code quality.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.