You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Andor Molnar (Jira)" <ji...@apache.org> on 2020/02/03 03:33:00 UTC
[jira] [Resolved] (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 ]
Andor Molnar resolved ZOOKEEPER-3708.
-------------------------------------
Fix Version/s: 3.6.1
3.7.0
3.5.7
Resolution: Fixed
Issue resolved by pull request 1240
[https://github.com/apache/zookeeper/pull/1240]
> 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
> Fix For: 3.5.7, 3.7.0, 3.6.1
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {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)