This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
Add support for GraalVM Native Image using java.util.logging #213
Labels
type: enhancement
A general enhancement
Milestone
logstash-gelf version: 1.13.0
When using the library with an application build as a native image via GraalVM, it didn't works. No stacktraces are shown but no logs are issued.
To reproduce the issue, use the library inside a GraalVM native image and you will see that no log events are sent.
I chased down the issue to
JulLogEvent.getThreadName(LogRecord)
. This method uses the ThreadMXBean to get the name of the thread from it's ID, but SubstratVM (the VM that runs the native image compiled by GraalVM) didn't implements JMX so this could not work.I have a working solution that I can contribute via a PR to replace the usage of the ThreadMXBean by
Thread.getAllStackTraces().keySet()
however I don't know if it has some performance implication (as it uses a cache maybe not important).The text was updated successfully, but these errors were encountered: