mail-api icon indicating copy to clipboard operation
mail-api copied to clipboard

CompactFormatter support for LogRecord::getLongThreadID

Open jmehrens opened this issue 5 years ago • 1 comments

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.

jmehrens avatar Feb 18 '21 01:02 jmehrens

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 avatar Apr 07 '21 23:04 jmehrens

This was committed to v1.x branch and will be forward ported to AngusMail.

jmehrens avatar Dec 22 '22 23:12 jmehrens