RFR: 8303198: System and Runtime.exit() resilience to logging errors
Alan Bateman
alanb at openjdk.org
Tue Feb 28 14:12:26 UTC 2023
On Tue, 28 Feb 2023 02:45:36 GMT, David Holmes <dholmes at openjdk.org> wrote:
> But does that logging include the thread identity? If multiple threads can race to exit and all log, then the developer/user needs to know which logging came from which thread.
That's really up to the Logger and its configuration. If j.u.logging is used then formatters can be configured to put the thread ID into the log records. With 3rd party logging libraries there seems to be several choices, like %t for the thread name.
The main usage for this logging is to be able to find code in tests, plugins, etc. that is calling System.exit and causing the test runner or container to exit. So I think it's less about "which thread" and more about "which code".
-------------
PR: https://git.openjdk.org/jdk/pull/12770
More information about the core-libs-dev
mailing list