Skip to content

CompactFormatter support for LogRecord::getLongThreadID #529

@jmehrens

Description

@jmehrens

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions