Raft behavior logging 36/15036/14
authortpantelis <tpanteli@brocade.com>
Tue, 10 Feb 2015 06:07:28 +0000 (01:07 -0500)
committertpantelis <tpanteli@brocade.com>
Wed, 18 Feb 2015 12:40:56 +0000 (07:40 -0500)
commit5dd83186d64a4b10214f32ec15f007dae016f5e6
treed79af0dd623a7838918c6adcd2a9444f96b583e3
parent2da365966737c83347ef7b84cc155246e10f1593
Raft behavior logging

Added more logging in the raft behavior classes where appropriate.

Reduced logging in some places to trace or removed redundant logging to
avoid too much output when debug level is enabled.

Removed isDebugEnabled() checks in various places where not needed to
improve test line coverage.

Also I found it useful to see the behavior's state in the log messages.
So I added a logName field and method to AbstractRaftBehavior that
is printed in each log message instead of just context.getId().

Also added/modified toString() in a few RaftRPC message classes.

Change-Id: Ic4d3c93e25d5caf16319b8433d54cab69b26f5c0
Signed-off-by: tpantelis <tpanteli@brocade.com>
13 files changed:
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Candidate.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AppendEntries.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AppendEntriesReply.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshot.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshotReply.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVote.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedPersistentActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.