Skip to content

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

Merged
eddumelendez merged 1 commit intodocker-java:mainfrom
belugabehr:log-debug-anchor
Jun 19, 2023
Merged

Use anchor instead of building toString() for debug logging#2035
eddumelendez merged 1 commit intodocker-java:mainfrom
belugabehr:log-debug-anchor

Conversation

@belugabehr
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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