JAL-3949 Complete new abstracted logging framework in jalview.log. Updated log calls...
[jalview.git] / src / jalview / ext / pymol / PymolManager.java
index 5f22526..6a014a5 100644 (file)
@@ -140,7 +140,7 @@ public class PymolManager
       int rc = conn.getResponseCode();
       if (rc != HttpURLConnection.HTTP_OK)
       {
-        Cache.log.error(
+        Cache.error(
                 String.format("Error status from %s: %d", rpcUrl, rc));
         return result;
       }
@@ -158,7 +158,7 @@ public class PymolManager
     } catch (SocketException e)
     {
       // thrown when 'quit' command is sent to PyMol
-      Cache.log.warn(String.format("Request to %s returned %s", rpcUrl,
+      Cache.warn(String.format("Request to %s returned %s", rpcUrl,
               e.toString()));
     } catch (Exception e)
     {
@@ -169,12 +169,12 @@ public class PymolManager
       {
         out.close();
       }
-      if (Cache.log.isTraceEnabled())
+      if (Cache.isTraceEnabled())
       {
-        Cache.log.trace("Sent: " + command.toString());
+        Cache.trace("Sent: " + command.toString());
         if (result != null)
         {
-          Cache.log.trace("Received: " + result);
+          Cache.trace("Received: " + result);
         }
       }
     }
@@ -251,12 +251,12 @@ public class PymolManager
       this.pymolXmlRpcPort = getPortNumber();
       if (pymolXmlRpcPort > 0)
       {
-        Cache.log.info("PyMOL XMLRPC started on port " + pymolXmlRpcPort);
+        Cache.info("PyMOL XMLRPC started on port " + pymolXmlRpcPort);
       }
       else
       {
         error += "Failed to read PyMOL XMLRPC port number";
-        Cache.log.error(error);
+        Cache.error(error);
         pymolProcess.destroy();
         pymolProcess = null;
       }
@@ -300,7 +300,7 @@ public class PymolManager
       }
     } catch (Exception e)
     {
-      Cache.log.error("Failed to get REST port number from " + responses
+      Cache.error("Failed to get REST port number from " + responses
               + ": " + e.getMessage());
       // logger.error("Failed to get REST port number from " + responses + ": "
       // + e.getMessage());
@@ -315,10 +315,10 @@ public class PymolManager
     }
     if (port == 0)
     {
-      Cache.log.error("Failed to start PyMOL with XMLRPC, response was: "
+      Cache.error("Failed to start PyMOL with XMLRPC, response was: "
               + responses);
     }
-    Cache.log.error("PyMOL started with XMLRPC on port " + port);
+    Cache.error("PyMOL started with XMLRPC on port " + port);
     return port;
   }