This is exactly the sort of place where it's useful to *not* turn a complex

value into a string and then throw it away when doing debug logging.
This commit is contained in:
Michael Bayne
2011-05-05 18:56:33 +00:00
parent e53288b7c4
commit 4c1864ddd6
@@ -316,7 +316,7 @@ public class PersistenceContext
log.warning("Cache key must not be null [entry=" + entry + "]", new Exception());
return;
}
log.debug("storing [key=" + key + ", value=" + entry + "]");
log.debug("storing", "key", key, "value", entry);
CacheAdapter.CachedValue<T> element = _cache.lookup(key.getCacheId(), key.getCacheKey());
T oldEntry = (element != null ? element.getValue() : null);
@@ -328,7 +328,7 @@ public class PersistenceContext
Set<CacheListener<?>> listeners = _listenerSets.get(key.getCacheId());
if (listeners != null && listeners.size() > 0) {
for (CacheListener<?> listener : listeners) {
log.debug("cascading [listener=" + listener + "]");
log.debug("cascading", "listener", listener);
@SuppressWarnings("unchecked")
CacheListener<T> casted = (CacheListener<T>)listener;
casted.entryCached(entry, oldEntry);
@@ -384,7 +384,7 @@ public class PersistenceContext
Set<CacheListener<?>> listeners = _listenerSets.get(cacheId);
if (listeners != null && listeners.size() > 0) {
for (CacheListener<?> listener : listeners) {
log.debug("cascading [listener=" + listener + "]");
log.debug("cascading", "listener", listener);
@SuppressWarnings("unchecked") CacheListener<T> casted =
(CacheListener<T>)listener;
casted.entryInvalidated(oldEntry);