JAL-3949 - refactor logging from jalview.bin.Cache to jalview.bin.Console
[jalview.git] / src / jalview / gui / PromptUserConfig.java
index d1fd7dd..31db21d 100644 (file)
@@ -21,6 +21,7 @@
 package jalview.gui;
 
 import jalview.bin.Cache;
+import jalview.bin.Console;
 
 import java.awt.Component;
 
@@ -131,7 +132,7 @@ public class PromptUserConfig implements Runnable
     if (lastq == null)
     {
       raiseDialog();
-      Cache.debug("Got user response.");
+      Console.debug("Got user response.");
     }
     lastq = Cache.getProperty(property);
     String extype = "";
@@ -183,7 +184,7 @@ public class PromptUserConfig implements Runnable
     // report any exceptions
     if (e != null)
     {
-      Cache.warn("Unexpected exception when executing the " + extype
+      Console.warn("Unexpected exception when executing the " + extype
               + " runnable for property " + property, e);
     }
   }
@@ -193,9 +194,9 @@ public class PromptUserConfig implements Runnable
    */
   private void raiseDialog()
   {
-    if (Cache.isDebugEnabled())
+    if (Console.isDebugEnabled())
     {
-      Cache.debug("Prompting user for " + dialogTitle
+      Console.debug("Prompting user for " + dialogTitle
               + " for Cache property " + property);
     }
     try
@@ -207,7 +208,7 @@ public class PromptUserConfig implements Runnable
               JvOptionPane.QUESTION_MESSAGE);
 
       // and finish parsing the result
-      Cache.debug("Got response : " + reply);
+      Console.debug("Got response : " + reply);
       if (reply == JvOptionPane.YES_OPTION)
       {
         Cache.setProperty(property, "true");
@@ -225,18 +226,18 @@ public class PromptUserConfig implements Runnable
       }
       else
       {
-        Cache.debug("User cancelled setting " + property);
+        Console.debug("User cancelled setting " + property);
         return;
       }
       // verify the property is set for debugging
-      if (Cache.isDebugEnabled())
+      if (Console.isDebugEnabled())
       {
-        Cache.debug("User set property to "
+        Console.debug("User set property to "
                 + Cache.getProperty(property));
       }
     } catch (Exception e)
     {
-      Cache.warn(
+      Console.warn(
               "Unexpected exception when prompting user for yes/no setting for property "
                       + property,
               e);