- log.debug("{}: Moving last applied index from {} to {}", id, this.lastApplied, lastApplied);
+ final Throwable stackTrace = log.isTraceEnabled() ? new Throwable() : null;
+ log.debug("{}: Moving last applied index from {} to {}", id, this.lastApplied, lastApplied, stackTrace);