JAL-4442 reprioritise JvOptionPane debug output to either trace, debug or warn
authorJim Procter <jprocter@dundee.ac.uk>
Wed, 21 Aug 2024 13:29:43 +0000 (14:29 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Wed, 21 Aug 2024 13:30:50 +0000 (14:30 +0100)
src/jalview/gui/JvOptionPane.java

index 726e942..7f4f132 100644 (file)
@@ -879,7 +879,7 @@ public class JvOptionPane extends JOptionPane
                   Thread.sleep(timeout);
                 } catch (InterruptedException e)
                 {
-                  Console.debug(
+                  Console.trace(
                           "Dialog timeout interrupted.  Probably a button pressed.");
                 }
                 jb.doClick();
@@ -900,7 +900,7 @@ public class JvOptionPane extends JOptionPane
         for (int i = 0; i < options.length; i++)
         {
           Object o = options[i];
-          jalview.bin.Console.debug(
+          jalview.bin.Console.trace(
                   "Setting button " + i + " to '" + o.toString() + "'");
           JButton jb = buttons[i];
 
@@ -920,7 +920,7 @@ public class JvOptionPane extends JOptionPane
               Object obj = e.getSource();
               if (obj == null || !(obj instanceof Component))
               {
-                jalview.bin.Console.debug(
+                jalview.bin.Console.warn(
                         "Could not find Component source of event object "
                                 + obj);
                 return;
@@ -930,7 +930,7 @@ public class JvOptionPane extends JOptionPane
               if (joptionpaneObject == null
                       || !(joptionpaneObject instanceof JOptionPane))
               {
-                jalview.bin.Console.debug(
+                jalview.bin.Console.warn(
                         "Could not find JOptionPane ancestor of event object "
                                 + obj);
                 return;
@@ -1464,7 +1464,7 @@ public class JvOptionPane extends JOptionPane
                       && options.length < 3))
       {
         jalview.bin.Console
-                .debug("JvOptionPane: not enough options for dialog type");
+                .warn("JvOptionPane: not enough options for dialog type");
       }
       optionsButtons = new JButton[options.length];
       for (int i = 0; i < options.length && i < 3; i++)
@@ -1701,7 +1701,7 @@ public class JvOptionPane extends JOptionPane
     {
       buttons[i] = new JButton();
       buttons[i].setText(buttonsText[i]);
-      Console.debug("DISABLING BUTTON " + buttons[i].getText());
+      Console.trace("DISABLING BUTTON " + buttons[i].getText());
       buttons[i].setEnabled(false);
       buttons[i].setVisible(false);
     }
@@ -1770,7 +1770,7 @@ public class JvOptionPane extends JOptionPane
         return executor.awaitTermination(timeout, TimeUnit.MILLISECONDS);
       } catch (InterruptedException e)
       {
-        Console.debug("Action was interrupted", e);
+        Console.trace("Action was interrupted", e);
       }
     }
     return true;