# HG changeset patch # User casties # Date 1485948163 -3600 # Node ID 677492395dc0ff6f635f480196848b32e30c91f4 # Parent ae732119447f9d8c95ca1788795ee826f98a3601 Cleaner log messages. diff -r ae732119447f -r 677492395dc0 src/main/java/org/mpi/openmind/cache/AbstractCacheService.java --- a/src/main/java/org/mpi/openmind/cache/AbstractCacheService.java Tue Jan 31 18:08:55 2017 +0100 +++ b/src/main/java/org/mpi/openmind/cache/AbstractCacheService.java Wed Feb 01 12:22:43 2017 +0100 @@ -195,7 +195,7 @@ long ct = cacheEnt.getAccessTime(); long et = ent.getAccessTime(); if (ct == 0 || et == 0 || et > ct) { - logger.error("Weird cache access times! old="+Long.toString(ct)+" new="+Long.toString(et)); + logger.warn("Weird cache access times! old="+Long.toString(ct)+" new="+Long.toString(et)); } return (ct == et); } @@ -337,7 +337,7 @@ long ct = cacheAtt.getAccessTime(); long et = att.getAccessTime(); if (ct == 0 || et == 0 || et > ct) { - logger.error("Weird cache access times! old="+Long.toString(ct)+" new="+Long.toString(et)); + logger.warn("Weird cache access times! old="+Long.toString(ct)+" new="+Long.toString(et)); } return (ct == et); } @@ -506,7 +506,7 @@ long ct = cacheRel.getAccessTime(); long et = rel.getAccessTime(); if (ct == 0 || et == 0 || et > ct) { - logger.error("Weird cache access times! old="+Long.toString(ct)+" new="+Long.toString(et)); + logger.warn("Weird cache access times! old="+Long.toString(ct)+" new="+Long.toString(et)); } return (ct == et); } diff -r ae732119447f -r 677492395dc0 src/main/java/org/mpi/openmind/cache/CacheService.java --- a/src/main/java/org/mpi/openmind/cache/CacheService.java Tue Jan 31 18:08:55 2017 +0100 +++ b/src/main/java/org/mpi/openmind/cache/CacheService.java Wed Feb 01 12:22:43 2017 +0100 @@ -474,7 +474,7 @@ */ public EntityDiff diffEntityCache(Entity ent, boolean acceptNewIDs) throws Exception { if (ent.isLightweight()) { - throw new Exception("Can not diff attributes and relations of lightweight entity!"); + throw new IllegalStateException("Can not diff attributes and relations of lightweight entity!"); } Long entId = ent.getId(); EntityDiff diff = new EntityDiff(); diff -r ae732119447f -r 677492395dc0 src/main/java/org/mpi/openmind/cache/WrapperService.java --- a/src/main/java/org/mpi/openmind/cache/WrapperService.java Tue Jan 31 18:08:55 2017 +0100 +++ b/src/main/java/org/mpi/openmind/cache/WrapperService.java Wed Feb 01 12:22:43 2017 +0100 @@ -733,7 +733,7 @@ logger.warn("Save with missing EditIntent!"); } } else { - logger.warn("but no difference to cache found."); + logger.warn("No difference to cache found."); } }