[suggestion] Move logger.terminal_colors
setting to the CLI layer
#4030
Labels
config-changes
Changes in configuration and start up of the Iroha
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
Description
I propose to move
logger.terminal_colors
out of the configuration file to the layer of application's CLI args parsing, which happens before the config file is read and parsed.Why
"Terminal colors" configure whether the overall Command Line Interface should be colorized or not. Therefore, it belongs to the layer of CLI args, not the config file. Moreover, I don't see a reason why logger output colors in terminal should differ from any other terminal output of Iroha.
Also, configuration parsing happens after CLI arguments parsing. The process of configuration parsing itself might involve logging of hints/warnings/errors with or without colors. If
terminal_colors
is set in the config file, it will be only available after the config is parsed. Thus, this option should be known before configuration parsing stage.Changes
logger.terminal_colors
parameter from config file--terminal-colors
CLI argument with a corresponding ENV var (e.g.TERMINAL_COLORS
)Also
logger.terminal_colors
is not set). This behaviour will stay the same.The text was updated successfully, but these errors were encountered: