diff options
| author | tison <wander4096@gmail.com> | 2019-10-10 14:37:45 +0200 |
|---|---|---|
| committer | Andor Molnar <andor@apache.org> | 2019-10-10 14:37:45 +0200 |
| commit | 11c07921c15e2fb7692375327b53f26a583b77ca (patch) | |
| tree | 9e569a792cf94d6121c9f9b1eb6f7e2d7f089ee7 /build.xml | |
| parent | 92fb05092aef6eb580e4259efc332f6f7cbdd994 (diff) | |
| download | zookeeper-11c07921c15e2fb7692375327b53f26a583b77ca.tar.gz | |
ZOOKEEPER-3509: Revisit log format
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.
Author: tison <wander4096@gmail.com>
Reviewers: enixon@apache.org, andor@apache.org
Closes #1100 from TisonKun/ZOOKEEPER-3509 and squashes the following commits:
0c3a4ded8 [tison] Address comment
dcb68eb61 [tison] ZOOKEEPER-3509: Revisit log format
Diffstat (limited to 'build.xml')
0 files changed, 0 insertions, 0 deletions
