Skip to content

Use anchor instead of building toString() for debug logging #2035

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

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

belugabehr
Copy link
Contributor

Instead of building the String for each object, then throwing it away if debug logger is not enabled, use an anchor that is only populated if debug is enabled. Saves on not creating the object toString value every time.

https://www.slf4j.org/faq.html#logging_performance

@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@eddumelendez eddumelendez merged commit a1243d6 into docker-java:main Jun 19, 2023
@eddumelendez
Copy link
Member

Thanks for your contribution, @belugabehr ! This is now merged in main branch and it will part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants