Conversation
|
|
||
| class LoggerConfiguration { | ||
|
|
||
| static void configure(boolean silent, boolean debug) { |
There was a problem hiding this comment.
Why do we use two parameters here? Are all 4 combination of their values valid? Maybe we should accept 3-valued enum?
SILENT, DEFAULT, DEBUG
There was a problem hiding this comment.
Reason is to make it easy to just pass the parameters of the RunCommand to the LoggerConfigurator.
Enum would increase clarity of the LoggerConfigurator class taken alone but not its usage. This way it's clear that logging is depenent on two flags.
If we can increase clarity on the fact that silent is superior to debug, I'd appreciate it.
There was a problem hiding this comment.
I think we should. If non flags are passed then default logging is enabled, if silent - non, if debug - debug. And then we end up with 3 levels, set on application level and non of other classes should think about it. Classes just log using appropriate log level (logger.info, logger.debug).
There was a problem hiding this comment.
I'm not sure if I get you completely right.
You'd like to introduce a 3-leveled ENUM and shift the logic which configuration to take to the RunCommand?
The classes themselves already use appropriate log level, the purpose of the configuration is to either hide or show the log information.
Co-Authored-By: pesse <[email protected]>
Adds some simple logging to cli. Does basically this:
Basic logging can be turned off via
-qor--quietAdditional, extensive, non-pretty logging can be turned on via
-dor--debugFixes #89
Fixes #76