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.
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.
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
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)
updated to latest svn main
Logged In: YES
user_id=12853
Originator: YES
File Added: tracecleanup3.patch.gz
Logged In: YES
user_id=1926652
Originator: NO
+1 Committed at revision 156