Anthony Urso commented on ZOOKEEPER-912:

I don't think you understand the problem.

log4j has different log levels for different severities.  Debug messages should 
be logged at level "debug." Warnings should be logged at level "warn." Errors 
should be logged at level "error." Zookeeper logs nearly everything at least at 
level "info," regardless of severity.

This leads to a situation where the uninformative debug message:

  10/10/27 21:05:09 INFO zookeeper.ClientCnxn: Socket connection established to 
localhost/, initiating session

Is logged at the same level as the should-be-way-more-noticeable error message:

  10/10/27 21:05:09 INFO zookeeper.ClientCnxn: Unable to read additional data 
from server sessionid 0x0, likely server has closed socket, closing socket 
connection and attempting reconnect

I can use log4j properties to turn off "info" level messages, but then I won't 
see those warnings and errors.  

If you truly feel that these log messages should be all-or-nothing, why not get 
rid of log4j entirely and use System.out.println?

> ZooKeeper client logs trace and debug messages at level INFO
> ------------------------------------------------------------
>                 Key: ZOOKEEPER-912
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-912
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.3.1
>            Reporter: Anthony Urso
>            Assignee: Anthony Urso
>            Priority: Minor
>             Fix For: 3.4.0
>         Attachments: zk-loglevel.patch
> ZK logs a lot of uninformative trace and debug messages to level INFO.  This 
> fuzzes up everything and makes it easy to miss useful log info. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to