You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/02/01 17:17:00 UTC
[jira] [Updated] (ZOOKEEPER-3708) Move Logging Code into Logging
Guard in Learner
[ https://issues.apache.org/jira/browse/ZOOKEEPER-3708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ZOOKEEPER-3708:
--------------------------------------
Labels: newbie noob pull-request-available (was: newbie noob)
> 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
> Assignee: David Mollitor
> Priority: Minor
> Labels: newbie, noob, pull-request-available
>
> {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)