Don't construct strings unnecessarily
@@ -90,11 +90,11 @@ public class RemoteSession extends Session {
void makeActive(ReloadHandler reloadHandler) {
Curator.CompletionWaiter waiter = zooKeeperClient.getActiveWaiter();
- log.log(LogLevel.DEBUG, logPre() + "Getting session from repo: " + getSessionId());
+ log.log(LogLevel.DEBUG, () -> logPre() + "Getting session from repo: " + getSessionId());
ApplicationSet app = ensureApplicationLoaded();
- log.log(LogLevel.DEBUG, logPre() + "Reloading config for " + getSessionId());
+ log.log(LogLevel.DEBUG, () -> logPre() + "Reloading config for " + getSessionId());
reloadHandler.reloadConfig(app);
- log.log(LogLevel.DEBUG, logPre() + "Notifying " + waiter);
+ log.log(LogLevel.DEBUG, () -> logPre() + "Notifying " + waiter);
notifyCompletion(waiter);
log.log(LogLevel.INFO, logPre() + "Session activated: " + getSessionId());
}
