JAL-3730 retry ping before failing; sysout logging changed to Cache.log
[jalview.git] / src / jalview / ext / ensembl / EnsemblMap.java
index cfc679c..16d16d2 100644 (file)
  */
 package jalview.ext.ensembl;
 
-import jalview.datamodel.AlignmentI;
-import jalview.datamodel.DBRefSource;
-import jalview.datamodel.GeneLociI;
-import jalview.datamodel.GeneLocus;
-import jalview.datamodel.Mapping;
-import jalview.util.MapList;
-
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -38,6 +31,14 @@ import java.util.Map;
 
 import org.json.simple.parser.ParseException;
 
+import jalview.bin.Cache;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.DBRefSource;
+import jalview.datamodel.GeneLociI;
+import jalview.datamodel.GeneLocus;
+import jalview.datamodel.Mapping;
+import jalview.util.MapList;
+
 /**
  * A client for the Ensembl REST service /map endpoint, to convert from
  * coordinates of one genome assembly to another.
@@ -157,7 +158,7 @@ public class EnsemblMap extends EnsemblRestClient
       return (parseAssemblyMappingResponse(url));
     } catch (Throwable t)
     {
-      System.out.println("Error calling " + url + ": " + t.getMessage());
+      Cache.log.error("Error calling " + url + ": " + t.getMessage());
       return null;
     }
   }
@@ -264,7 +265,7 @@ public class EnsemblMap extends EnsemblRestClient
       return null;
     } catch (Throwable t)
     {
-      System.out.println("Error calling " + url + ": " + t.getMessage());
+      Cache.log.error("Error calling " + url + ": " + t.getMessage());
       return null;
     }
   }