Ghatage commented on pull request #2455: URL: https://github.com/apache/bookkeeper/pull/2455#issuecomment-716717906
Hi @eolivelli, Apologies as I think I wasn't clear. Let me explain. 1. BookieShell / bkctl already use Loggers and print to a log file **as well as** to the console. For example in [this command](https://github.com/apache/bookkeeper/blob/aff51a53dbe38470c9c5f80954210af56965e73b/bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/LocalConsistencyCheckCommand.java#L61) like many others already we have `LOG.info()` which prints to the console as well as to the log file. 2. So now we know that when we execute these interactive commands, we print to the console as well as log to a file. The problem arises when there is inconsistency. From my changes you can see that there are places where we have `System.out.println()` instead of `LOG.info()` So in those cases, we **only print to the console** and don't save that interaction output in the log file. This change relieves that inconsistency and makes all commands print to console **as well as** log file. This way, when we implement audit logging, it will save all user interactions. > How can we distinguish the output for the user from the logs of the application ? We currently log bookieshell logs differently in a different log file. So interactions from the user (bookieshell/bkctl) will go into that log file. The logs of the server are in a separate log file. Log file name, location and access properties for bkctl are controlled by [log4j.cli.properties](https://github.com/apache/bookkeeper/blob/master/conf/log4j.cli.properties) and log file name, location and other properties for BookieShell are controlled by [log4j.shell.properties](https://github.com/apache/bookkeeper/blob/master/conf/log4j.shell.properties) ---------------------------------------------------------------- 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]
