Skip to content

Commit

Permalink
ZOOKEEPER-3708: Move Logging Code into Logging Guard in Learner
Browse files Browse the repository at this point in the history
Author: David Mollitor <dmollitor@apache.org>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes apache#1240 from belugabehr/ZOOKEEPER-3708
  • Loading branch information
belugabehr authored and anmolnar committed Feb 3, 2020
1 parent d3ce1fa commit 68e1f7d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ void readPacket(QuorumPacket pp) throws IOException {
leaderIs.readRecord(pp, "packet");
messageTracker.trackReceived(pp.getType());
}
long traceMask = ZooTrace.SERVER_PACKET_TRACE_MASK;
if (pp.getType() == Leader.PING) {
traceMask = ZooTrace.SERVER_PING_TRACE_MASK;
}
if (LOG.isTraceEnabled()) {
final long traceMask =
(pp.getType() == Leader.PING) ? ZooTrace.SERVER_PING_TRACE_MASK
: ZooTrace.SERVER_PACKET_TRACE_MASK;

ZooTrace.logQuorumPacket(LOG, traceMask, 'i', pp);
}
}
Expand Down

0 comments on commit 68e1f7d

Please sign in to comment.