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
155 files changed
tree: 9e569a792cf94d6121c9f9b1eb6f7e2d7f089ee7
  1. bin/
  2. conf/
  3. dev/
  4. zookeeper-assembly/
  5. zookeeper-client/
  6. zookeeper-contrib/
  7. zookeeper-docs/
  8. zookeeper-it/
  9. zookeeper-jute/
  10. zookeeper-metrics-providers/
  11. zookeeper-recipes/
  12. zookeeper-server/
  13. .gitattributes
  14. .gitignore
  15. .travis.yml
  16. build.xml
  17. checkstyle-simple.xml
  18. checkstyle-strict.xml
  19. checkstyleSuppressions.xml
  20. excludeFindBugsFilter.xml
  21. ivy.xml
  22. ivysettings.xml
  23. LICENSE.txt
  24. NOTICE.txt
  25. owaspSuppressions.xml
  26. pom.xml
  27. README.md
  28. README_packaging.txt
  29. zk-merge-pr.py
README.md

Apache ZooKeeper Build Status Maven Central License

alt text

For the latest information about Apache ZooKeeper, please visit our website at:

http://zookeeper.apache.org/

and our wiki, at:

https://cwiki.apache.org/confluence/display/ZOOKEEPER


Packaging/release artifacts

Either downloaded from https://zookeeper.apache.org/releases.html or found in zookeeper-assembly/target directory after building the project with maven.

apache-zookeeper-[version].tar.gz

    Contains all the source files which can be built by running:
    mvn clean install

    To generate an aggregated apidocs for zookeeper-server and zookeeper-jute:
    mvn javadoc:aggregate
    (generated files will be at target/site/apidocs)

apache-zookeeper-[version]-bin.tar.gz

    Contains all the jar files required to run ZooKeeper
    Full documentation can also be found in the docs folder

As of version 3.5.5, the parent, zookeeper and zookeeper-jute artifacts are deployed to the central repository after the release is voted on and approved by the Apache ZooKeeper PMC:

https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper/

Contributing

We always welcome new contributors to the project! See How to Contribute for details on how to submit patch through pull request and our contribution workflow.