commit | b1e602afc93cfd6299c43f99d26c9a6b7bcd27a7 | [log] [tgz] |
---|---|---|
author | Anup Ghatage <ghatage@apache.org> | Tue Oct 27 06:58:41 2020 -0700 |
committer | GitHub <noreply@github.com> | Tue Oct 27 14:58:41 2020 +0100 |
tree | 5093f574accac9537fa6ccafd97e6b2a31a82210 | |
parent | 51bfd221f8e35c7a69a35286a8988e0dd01ac11b [diff] |
BP-40: Convert all System.*.print statements to LOG.* statements ### Motivation In order to have an audit log of all user interactions, all print statements which come from such interactions need to be logged. We have two user driven ways to mutate BookKeeper: * BookieShell * bkctl Both internally use the same code from `tools/cli` ### Changes The logging in the code was inconsistent. At times we used `System.out.println` and at times we used `LOG.info`. As a part of this work item we change these in the following way: * For every `cli` class, confirm if a Logger object is present, if not create one. * Convert all `System.out.println()` -> `LOG.info()` * Convert all `System.err.println()` -> `LOG.error()` ### Ramifications BookieShell uses `log4j.shell.properties` bkctl uses `log4j.cli.properties` Both log4j property files have `CONSOLE appenders`, so the like previous `System.out.println()`, the new `LOG` statements will also be printed to console. This is mentioned explicitly as certain upstream consumers / scripts utilize BookieShell / bkctl to assess the state of the BK cluster. Master Issue: #2209 Reviewers: Enrico Olivelli <eolivelli@gmail.com> This closes #2455 from Ghatage/BP-40/auditLogging
Apache BookKeeper is a scalable, fault tolerant and low latency storage service optimized for append-only workloads.
It is suitable for being used in following scenarios:
You can also read Turning Ledgers into Logs to learn how to turn ledgers into continuous log streams. If you are looking for a high level log stream API, you can checkout DistributedLog.
For filing bugs, suggesting improvements, or requesting new features, help us out by opening a Github issue or opening an Apache jira.
Subscribe or mail the user@bookkeeper.apache.org list - Ask questions, find answers, and also help other users.
Subscribe or mail the dev@bookkeeper.apache.org list - Join development discussions, propose new ideas and connect with contributors.
Join us on Slack - This is the most immediate way to connect with Apache BookKeeper committers and contributors.
We feel that a welcoming open community is important and welcome contributions.
See Developer Setup to get your local environment setup.
Take a look at our open issues: JIRA Issues Github Issues.
Review our coding style and follow our pull requests to learn about our conventions.
Make your changes according to our contribution guide.