Skip to content

Commit f2d9bd4

Browse files
committed
Reapply "log: add status to incr/decr debug logs"
This reverts commit fe568e0.
1 parent b4f2204 commit f2d9bd4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

evcache-core/src/main/java/com/netflix/evcache/EVCacheImpl.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2946,8 +2946,8 @@ public long incr(String key, long by, long defaultVal, int timeToLive) throws EV
29462946
} finally {
29472947
final long duration = this.clock.monotonicTime()- start;
29482948
getTimer(Call.INCR.name(), EVCacheMetricsFactory.WRITE, null, status, 1, maxWriteDuration.get().intValue(), null).record(duration, TimeUnit.NANOSECONDS);
2949-
if (log.isDebugEnabled() && shouldLog()) log.debug("INCR : APP " + _appName + ", Took " + TimeUnit.NANOSECONDS.toMillis(duration)
2950-
+ " milliSec for key : " + key + " with value as " + currentValue);
2949+
if (log.isDebugEnabled() && shouldLog())
2950+
log.debug("INCR : status {} for APP {}, Took {} milliSec for key : {} with value as {}", status, _appName, TimeUnit.NANOSECONDS.toMillis(duration), key, currentValue);
29512951
}
29522952
}
29532953

@@ -3033,7 +3033,8 @@ public long decr(String key, long by, long defaultVal, int timeToLive) throws EV
30333033
} finally {
30343034
final long duration = this.clock.monotonicTime()- start;
30353035
getTimer(Call.DECR.name(), EVCacheMetricsFactory.WRITE, null, status, 1, maxWriteDuration.get().intValue(), null).record(duration, TimeUnit.NANOSECONDS);
3036-
if (log.isDebugEnabled() && shouldLog()) log.debug("DECR : APP " + _appName + ", Took " + TimeUnit.NANOSECONDS.toMillis(duration) + " milliSec for key : " + key + " with value as " + currentValue);
3036+
if (log.isDebugEnabled() && shouldLog())
3037+
log.debug("DECR : status {} for APP {}, Took {} milliSec for key : {} with value as {}", status, _appName, TimeUnit.NANOSECONDS.toMillis(duration), key, currentValue);
30373038
}
30383039
}
30393040

0 commit comments

Comments
 (0)