Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add logging to user profile data #93

Merged
merged 4 commits into from
May 17, 2024

Conversation

MahmoudHosamGaber
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@Pandemic1617 Pandemic1617 left a comment

Choose a reason for hiding this comment

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

Just some suggestions
Nothing critical though, otherwise LGTM

Optional<Freelancer> freelancerOptional = freelancerRepository.findById(request.getUserId());
if (freelancerOptional.isEmpty())
if (freelancerOptional.isEmpty()) {
logger.info("Freelancer Not Found");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe it would be better if this and other similar situations are logged as errors

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@Override
public AddFreelancerAchievementResponse Run(AddFreelancerAchievementRequest request) {
logger.info("Add Freelancer Achievement");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think including the requesting user's id would make the logs clearer for this and other function call logs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@ShimaaBetah ShimaaBetah merged commit fe5c2a5 into users-logging May 17, 2024
1 check passed
@ShimaaBetah ShimaaBetah deleted the mahmoud/users-logging branch May 17, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants