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

chore: change info to debug logging #410

Merged
merged 2 commits into from
Nov 22, 2023
Merged

chore: change info to debug logging #410

merged 2 commits into from
Nov 22, 2023

Conversation

Tomvbe
Copy link
Contributor

@Tomvbe Tomvbe commented Nov 22, 2023

No description provided.

var httpMethod = HttpMethod.POST.name();
var type = request.headers().contentType().map(MediaType::toString).orElse("(unknown)");
long contentLength = request.headers().contentLength().orElse(0L);
log.atDebug().log("%s /%s type: %s length: %s".formatted(httpMethod, endpoint, type, contentLength));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason why you would not use the built in formatting from the debugger in stead of the String.formatted()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, good remark. I started refactoring from from a String.formatted and didn't question it. I will change it.

Copy link
Collaborator

@jobulcke jobulcke left a comment

Choose a reason for hiding this comment

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

Fix code smell please

Copy link

sonarcloud bot commented Nov 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

82.6% 82.6% Coverage
0.0% 0.0% Duplication

@Tomvbe Tomvbe added this pull request to the merge queue Nov 22, 2023
Merged via the queue into develop with commit b627284 Nov 22, 2023
3 checks passed
@Tomvbe Tomvbe deleted the fix/logging branch November 22, 2023 10:34
jobulcke pushed a commit that referenced this pull request Dec 5, 2023
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.

Use debug logging instead of info logging for http request logging
2 participants