Menu

#60 cleanup trace logging

closed-accepted
None
7
2008-05-08
2008-05-02
No

Cleanup of trace logging.

Renamed ZooLog to ZooTrace. Major cleanup of tracing.

When this is merged please review the trace messages - it looks like a number of them are really debug/info level messages - they should be updated appropriately.

This should be the last major change for log4j integration - other than adding more info/debug/trace messages as appropriate.

Discussion

  • Patrick Hunt

    Patrick Hunt - 2008-05-06

    Logged In: YES
    user_id=12853
    Originator: YES

    The assignee is responsible for closing (committing) this patch (see ZooKeeperPatches on wiki) -- this includes getting additional review if necessary.

     
  • Patrick Hunt

    Patrick Hunt - 2008-05-06
    • priority: 5 --> 7
    • assigned_to: nobody --> akornev
     
  • Andrew Kornev

    Andrew Kornev - 2008-05-07

    Logged In: YES
    user_id=1926652
    Originator: NO

    Other than a few things mentioned below, the patch looks good.

    ClientCnxn.java: This check to see if trace is enabled seems to be redundant as logTraceMessage() performs the same check:

    long traceMask = ZooTrace.SESSION_TRACE_MASK;
    if (ZooTrace.isTraceEnabled(LOG, traceMask)) {
    ZooTrace.logTraceMessage(LOG, traceMask,
    "Close ClientCnxn for session: " + sessionId + "!");
    }

    util/Profiler.java: Unused TraceLog import, LOG severity should be warn not error

    Unused TraceLog import:

    AuthFastLeaderElection.java
    FastLeaderElection.java
    FollowerZooKeeperServer.java
    Leader.java
    LeaderElection.java
    QuorumCnxManager.java
    QuorumPeerConfig.java
    SendAckRequestProcessor.java

     
  • Patrick Hunt

    Patrick Hunt - 2008-05-07

    Logged In: YES
    user_id=12853
    Originator: YES

    The first issue you mention is a common pattern for logging code - the "istraceenabled" eliminates the string concatenation expense when tracing is not turned on (optimization).
    (should not be changed)

     
  • Patrick Hunt

    Patrick Hunt - 2008-05-08

    updated to latest svn main

     
  • Patrick Hunt

    Patrick Hunt - 2008-05-08

    Logged In: YES
    user_id=12853
    Originator: YES

    File Added: tracecleanup3.patch.gz

     
  • Andrew Kornev

    Andrew Kornev - 2008-05-08
    • status: open --> closed-accepted
     
  • Andrew Kornev

    Andrew Kornev - 2008-05-08

    Logged In: YES
    user_id=1926652
    Originator: NO

    +1 Committed at revision 156

     

Log in to post a comment.