X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fvamsas%2FDatastoreItem.java;h=e20f51e05b6757f06857a59c23c9082dad75553e;hp=a1d83801bb719cd8b40a92453fab37d3a93051a8;hb=a1984b1c8c273ed33c7ce9283039f4027dcae2de;hpb=c4e814d2930b175c789c2a004801b7b8a1dacd32 diff --git a/src/jalview/io/vamsas/DatastoreItem.java b/src/jalview/io/vamsas/DatastoreItem.java index a1d8380..e20f51e 100644 --- a/src/jalview/io/vamsas/DatastoreItem.java +++ b/src/jalview/io/vamsas/DatastoreItem.java @@ -25,11 +25,9 @@ import java.util.Hashtable; import java.util.IdentityHashMap; import java.util.Vector; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import jalview.bin.Cache; import jalview.io.VamsasAppDatastore; +import jalview.log.JLoggerLog4j; import jalview.util.MessageManager; import uk.ac.vamsas.client.IClientDocument; import uk.ac.vamsas.client.Vobject; @@ -62,7 +60,8 @@ public abstract class DatastoreItem /** * shared log instance */ - protected static Logger log = LogManager.getLogger(DatastoreItem.class); + protected static JLoggerLog4j log = JLoggerLog4j + .getLogger(DatastoreItem.class.getCanonicalName()); /** * note: this is taken verbatim from jalview.io.VamsasAppDatastore @@ -75,9 +74,9 @@ public abstract class DatastoreItem { return cdoc.getObject((VorbaId) jv2vobj.get(jvobj)); } - if (Cache.log.isDebugEnabled()) + if (Cache.isDebugEnabled()) { - Cache.log.debug( + Cache.debug( "Returning null VorbaID binding for jalview object " + jvobj); } return null; @@ -96,7 +95,7 @@ public abstract class DatastoreItem if (id == null) { id = cdoc.registerObject(vobj); - Cache.log.debug( + Cache.debug( "Registering new object and returning null for getvObj2jv"); return null; } @@ -123,7 +122,7 @@ public abstract class DatastoreItem if (id == null || vobj.getVorbaId() == null || cdoc.getObject(id) != vobj) { - Cache.log.error("Failed to get id for " + Cache.error("Failed to get id for " + (vobj.isRegisterable() ? "registerable" : "unregisterable") + " object " + vobj); @@ -132,7 +131,7 @@ public abstract class DatastoreItem if (vobj2jv.containsKey(vobj.getVorbaId()) && !(vobj2jv.get(vobj.getVorbaId())).equals(jvobj)) { - Cache.log.debug( + Cache.debug( "Warning? Overwriting existing vamsas id binding for " + vobj.getVorbaId(), new Exception(MessageManager.getString( @@ -141,20 +140,20 @@ public abstract class DatastoreItem else if (jv2vobj.containsKey(jvobj) && !((VorbaId) jv2vobj.get(jvobj)).equals(vobj.getVorbaId())) { - Cache.log.debug( + Cache.debug( "Warning? Overwriting existing jalview object binding for " + jvobj, new Exception(MessageManager.getString( "exception.overwriting_jalview_id_binding"))); } /* - * Cache.log.error("Attempt to make conflicting object binding! "+vobj+" id " + * Cache.error("Attempt to make conflicting object binding! "+vobj+" id " * +vobj.getVorbaId()+" already bound to "+getvObj2jv(vobj)+" and "+jvobj+" * already bound to "+getjv2vObj(jvobj),new Exception("Excessive call to * bindjvvobj")); } */ // we just update the hash's regardless! - Cache.log.debug("Binding " + vobj.getVorbaId() + " to " + jvobj); + Cache.debug("Binding " + vobj.getVorbaId() + " to " + jvobj); vobj2jv.put(vobj.getVorbaId(), jvobj); // JBPNote - better implementing a hybrid invertible hash. jv2vobj.put(jvobj, vobj.getVorbaId()); @@ -172,8 +171,8 @@ public abstract class DatastoreItem { if (this.jvobj != null && this.vobj != null) { - Cache.log.debug("updating dsobj registry. (" - + this.getClass().getName() + ")"); + Cache.debug("updating dsobj registry. (" + this.getClass().getName() + + ")"); } this.jvobj = jvobj; this.vobj = vobj;