You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/09/27 18:25:52 UTC

[GitHub] [zookeeper] TisonKun opened a new pull request #1100: ZOOKEEPER-3509: Revisit log format

TisonKun opened a new pull request #1100: ZOOKEEPER-3509: Revisit log format
URL: https://github.com/apache/zookeeper/pull/1100
 
 
   1. Always wrap `.trace` with `isTraceEnabled`. It is because that some of trace calls are a bit complex.
   2. Never wrap other levels with `isXXXEnabled`. Logger already checks log level and we don't make side effect or expensive operation in log statement.
   3. Always use `{}` instead of string concatenation or `String.format`. Just for unification and it is what is recommended.
   4. Always log throwable in warn or error level or debug if omit
   5. Always log throwable as the last arg and never log `throwable.getMessage` since Logger already log stack trace.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services