David Mollitor created ZOOKEEPER-3708:
-----------------------------------------
Summary: Move Logging Code into Logging Guard in Learner
Key: ZOOKEEPER-3708
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3708
Project: ZooKeeper
Issue Type: Improvement
Reporter: David Mollitor
{code:java|title=Learner.java}
void readPacket(QuorumPacket pp) throws IOException {
...
long traceMask = ZooTrace.SERVER_PACKET_TRACE_MASK;
if (pp.getType() == Leader.PING) {
traceMask = ZooTrace.SERVER_PING_TRACE_MASK;
}
if (LOG.isTraceEnabled()) {
ZooTrace.logQuorumPacket(LOG, traceMask, 'i', pp);
}
}
{code}
The traceMask only matters if trace is enabled, so move it and the associated
code into the logging guard.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)