Merge branch 'develop' into update_212_Dec_merge_with_21125_chamges
[jalview.git] / src / jalview / ws / gui / MsaWSThread.java
index 48846ef..9298fb5 100644 (file)
@@ -21,6 +21,7 @@
 package jalview.ws.gui;
 
 import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentOrder;
@@ -58,6 +59,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
 
   // order
 
+
   String alTitle; // name which will be used to form new alignment window.
 
   AlignmentI dataset; // dataset to which the new alignment will be
@@ -199,7 +201,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
           {
             cancelledMessage += ("\nProblems cancelling the job : Exception received...\n"
                     + exc + "\n");
-            Cache.log.warn(
+            Console.warn(
                     "Exception whilst cancelling " + jobs[job].getJobId(),
                     exc);
           }
@@ -258,9 +260,9 @@ public class MsaWSThread extends AWSThread implements WSClientI
     MsaWSJob j = (MsaWSJob) job;
     if (j.isSubmitted())
     {
-      if (Cache.log.isDebugEnabled())
+      if (Console.isDebugEnabled())
       {
-        Cache.log.debug(
+        Console.debug(
                 "Tried to submit an already submitted job " + j.getJobId());
       }
       return;
@@ -288,7 +290,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
 
       } catch (Throwable throwable)
       {
-        Cache.log.error("failed to send the job to the alignment server", throwable);
+        Console.error("failed to send the job to the alignment server", throwable);
         if (!server.handleSubmitError(throwable, j, wsInfo))
         {
           if (throwable instanceof Exception)
@@ -302,6 +304,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
         }
       }
       ///// generic
+
       if (j.getJobId() != null)
       {
         j.setSubmitted(true);
@@ -385,7 +388,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
             } catch (Exception e)
             {
 
-              Cache.log.warn(
+              Console.warn(
                       "Exception when retrieving remaining Job progress data for job "
                               + msjob.getJobId() + " on server " + WsUrl);
               e.printStackTrace();
@@ -409,7 +412,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
             }
           } while (nunchanged > 0 && nexcept > 0);
 
-          if (Cache.log.isDebugEnabled())
+          if (Console.isDebugEnabled())
           {
             System.out.println("Job Execution file for job: "
                     + msjob.getJobId() + " on server " + WsUrl);
@@ -425,7 +428,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
           {
             if (!server.handleCollectionException(e, msjob, wsInfo))
             {
-              Cache.log.error("Couldn't get Alignment for job.", e);
+              Console.error("Couldn't get Alignment for job.", e);
               // TODO: Increment count and retry ?
               msjob.setState(JobState.SERVERERROR);
             }
@@ -441,7 +444,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
     } catch (Exception ex)
     {
 
-      Cache.log.error(
+      Console.error(
               "Unexpected exception when processing results for " + alTitle,
               ex);
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
@@ -535,6 +538,7 @@ public class MsaWSThread extends AWSThread implements WSClientI
     if (newFrame)
     {
       displayInNewFrame(al, alorders, hidden);
+
     }
     else
     {