zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] TisonKun opened a new pull request #1100: ZOOKEEPER-3509: Revisit log format
Date Fri, 27 Sep 2019 18:25:52 GMT
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

Mime
View raw message