changeset 68:677492395dc0

Cleaner log messages.
author casties
date Wed, 01 Feb 2017 12:22:43 +0100
parents ae732119447f
children bde6212babfd
files src/main/java/org/mpi/openmind/cache/AbstractCacheService.java src/main/java/org/mpi/openmind/cache/CacheService.java src/main/java/org/mpi/openmind/cache/WrapperService.java
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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);
 	}
--- 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();
--- 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.");
 			}
 		}