Ghatage opened a new pull request #2455:
URL: https://github.com/apache/bookkeeper/pull/2455


   ### 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 
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to