You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2020/01/31 00:02: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 ]

David Mollitor updated ZOOKEEPER-3708:
--------------------------------------
    Labels: noob  (was: )

> 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
>            Priority: Minor
>              Labels: noob
>
> {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)