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

CompactFormatter support for LogRecord::getLongThreadID #52

Closed
jmehrens opened this issue Dec 22, 2022 · 1 comment
Closed

CompactFormatter support for LogRecord::getLongThreadID #52

jmehrens opened this issue Dec 22, 2022 · 1 comment
Assignees

Comments

@jmehrens
Copy link
Contributor

JDK16 added new a method LogRecord::getLongThreadID and deprecated LogRecord::getThreadID. Changes are filed under: JDK-8245302 - Upgrade LogRecord to support long thread ids and remove its usage of ThreadLocal

The CompactFormatter supports formatting thread ids so the code should be modified to prefer calling LogRecord::getLongThreadID and fallback toLogRecord::getThreadID only if it the long version is not present. This will allow the formatter to support newer JDKs without introducing dependency on the newer JDK version.

This issue is forward port of jakartaee/mail-api#529

For Android, MethodHandles are only available in Oreo | 8.0.0

https://source.android.com/setup/start/build-numbers
https://developer.android.com/reference/java/lang/invoke/package-summary

@jmehrens
Copy link
Contributor Author

Committed as:
6ee9fec

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

No branches or pull requests

1 participant