From 85d6c4e85b067e72af161cbe584ad8f247565055 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 21 Aug 2024 14:31:16 +0100 Subject: [PATCH] JAL-4442 reprioritise QuitHandler debug output to either trace, debug or warn --- src/jalview/gui/QuitHandler.java | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/jalview/gui/QuitHandler.java b/src/jalview/gui/QuitHandler.java index 9917222..7605fa8 100644 --- a/src/jalview/gui/QuitHandler.java +++ b/src/jalview/gui/QuitHandler.java @@ -95,12 +95,12 @@ public class QuitHandler protected static QResponse setResponse(QResponse qresponse) { - Console.debug("setResponse(" + qresponse.toString() + ")"); + Console.trace("setResponse(" + qresponse.toString() + ")"); gotQuitResponse = qresponse; if ((qresponse == QResponse.CANCEL_QUIT || qresponse == QResponse.NULL) && flatlafResponse != null) { - Console.debug("Running flatLafResponse.cancelQuit()"); + Console.trace("Running flatLafResponse.cancelQuit()"); flatlafResponse.cancelQuit(); } return qresponse; @@ -112,18 +112,18 @@ public class QuitHandler } public static final Runnable defaultCancelQuit = () -> { - Console.debug("QuitHandler: (default) Quit action CANCELLED by user"); + Console.trace("QuitHandler: (default) Quit action CANCELLED by user"); // reset setResponse(QResponse.CANCEL_QUIT); }; public static final Runnable defaultOkQuit = () -> { - Console.debug("QuitHandler: (default) Quit action CONFIRMED by user"); + Console.trace("QuitHandler: (default) Quit action CONFIRMED by user"); setResponse(QResponse.QUIT); }; public static final Runnable defaultForceQuit = () -> { - Console.debug("QuitHandler: (default) Quit action FORCED by user"); + Console.trace("QuitHandler: (default) Quit action FORCED by user"); // note that shutdown hook will not be run Runtime.getRuntime().halt(0); setResponse(QResponse.FORCE_QUIT); // this line never reached! @@ -139,12 +139,12 @@ public class QuitHandler Runnable forceQuit, Runnable cancelQuit) { QResponse got = gotQuitResponse(); - Console.debug("Quit response is '" + got.toString() + Console.trace("Quit response is '" + got.toString() + "' at start of getQuitResponse(...)"); if (got != QResponse.NULL && got != QResponse.CANCEL_QUIT) { // quit has already been selected, continue with calling quit method - Console.debug("Returning already set quit response of '" + Console.trace("Returning already set quit response of '" + got.toString() + "' at start of getQuitResponse(...)"); return got; } @@ -167,7 +167,7 @@ public class QuitHandler { confirmQuit = jalview.bin.Cache .getDefault(jalview.gui.Desktop.CONFIRM_KEYBOARD_QUIT, true); - Console.debug("Jalview property '" + Console.trace("Jalview property '" + jalview.gui.Desktop.CONFIRM_KEYBOARD_QUIT + "' is " + confirmQuit + " -- " + (confirmQuit ? "" : "not ") + "confirming quit"); @@ -176,7 +176,7 @@ public class QuitHandler got = confirmQuit ? QResponse.NULL : QResponse.QUIT; setResponse(got); - Console.debug("confirmQuit is '" + confirmQuit + Console.trace("confirmQuit is '" + confirmQuit + "', setting quit response to " + got); if (confirmQuit) @@ -200,12 +200,12 @@ public class QuitHandler MessageManager.getString("action.cancel") }, MessageManager.getString("action.quit"), true); - Console.debug("Waiting for response handler to run action"); + Console.trace("Waiting for response handler to run action"); qd.waitForHandlerToFinish(); } got = gotQuitResponse(); - Console.debug("Quit response is '" + got.toString() + Console.trace("Quit response is '" + got.toString() + "' after response handler"); // check for external viewer frames @@ -260,7 +260,7 @@ public class QuitHandler got = gotQuitResponse(); - Console.debug("Quit response is '" + got.toString() + Console.trace("Quit response is '" + got.toString() + "' after external structure viewer check"); boolean wait = false; -- 1.7.10.2