On Mon, 27 Feb 2023 15:41:01 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> Consolidate logging and handle exceptions by printing to standard error and 
> ignoring the exception.
> Exceptions while logging will not interfere with Runtime.exit.

src/java.base/share/classes/java/lang/Shutdown.java line 186:

> 184:             try {
> 185:                 // Exceptions from the Logger are printed but do not 
> prevent exit
> 186:                 System.err.println("Runtime.exit() logging failed: " + 
> throwable.getMessage());

Hello Roger, do you think including the exit code in this System.err.println 
message would be useful too? That would then mean that if the Logger failed for 
whatever reason, this fallback message would at least include the exit code to 
provide some hints on what might have triggered the exit.

-------------

PR: https://git.openjdk.org/jdk/pull/12770

Reply via email to