RFR: 8301627: System.exit and Runtime.exit debug logging
Alan Bateman
alanb at openjdk.org
Sun Feb 12 18:18:26 UTC 2023
On Fri, 10 Feb 2023 20:33:39 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> It can be difficult to find the cause of calls to `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java runtime exits.
> The status value and stack trace are logged using the System Logger named `java.lang.Runtime` with message level `System.Logger.Level.DEBUG`.
src/java.base/share/classes/java/lang/Shutdown.java line 162:
> 160: * If the system logger {@code java.lang.Runtime} is enabled for logging level DEBUG/FINE
> 161: * the stack trace of the call to {@code Runtime.exit()} or {@code System.exit()}
> 162: * is logged.
Shutdown is not a public class so this impNote won't appear in the APIs docs. Should it move to Runtime.exit and System.exit? If it moved to a public API then "system logger" could link to System.Logger. Also would it be more correct to say "a system logger named "java.lang.Runtime" is enabled for logging levels DEBUG or FINE"?
-------------
PR: https://git.openjdk.org/jdk/pull/12517
More information about the core-libs-dev
mailing list