From 26448d92f76ceb25424de4b33c6e251be3756812 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 30 Mar 2016 16:05:29 +0200 Subject: [PATCH] Do not use Stopwatch.toString() in logging This prevents a conversion if the log level is not active. Change-Id: Ia176a61c50929d500a5e041dd59d39c12a445f62 Signed-off-by: Robert Varga --- .../cluster/raft/RaftActorLeadershipTransferCohort.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohort.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohort.java index 2916867ffd..85980e2ca3 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohort.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohort.java @@ -159,10 +159,9 @@ public class RaftActorLeadershipTransferCohort { transferTimer.stop(); if(success) { LOG.info("{}: Successfully transferred leadership to {} in {}", raftActor.persistenceId(), - raftActor.getLeaderId(), transferTimer.toString()); + raftActor.getLeaderId(), transferTimer); } else { - LOG.warn("{}: Failed to transfer leadership in {}", raftActor.persistenceId(), - transferTimer.toString()); + LOG.warn("{}: Failed to transfer leadership in {}", raftActor.persistenceId(), transferTimer); } } -- 2.36.6