[suggestion] Simplify logger's behaviour and configuration #4064
Labels
config-changes
Changes in configuration and start up of the Iroha
Enhancement
New feature or request
good first issue
Good for newcomers
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
UI
Something about the interface
Description
I think the current logger's behaviour & configuration are a little overcomplicated, and I see a way to make its UX more straightforward and useful.
Current implementation
Iroha prints logs into standard output in default way and optionally into a file in JSON format.
There are these options:
level
: logging verbositycompact_mode
: flag to make logs in the standard output less verbose in terms of formatterminal_colors
: flag to control ANSI colouring in the standard outputlog_file_path
: enables JSON logging into a file, in a addition to standard outputlog_file_path
seems not useful for me here. It is the only way to get JSON logs, and if you need JSON logs, than you most probably don't need any other logs. However, stdout is always busy with default logging.Apart from that, I've created a separate issue for removal of
terminal_colors
from the logger configuration:logger.terminal_colors
setting to the CLI layer #4030Proposal
terminal_colors
([suggestion] Movelogger.terminal_colors
setting to the CLI layer #4030),log_file_path
andcompact_mode
format
option to change the format of logger output. I think we can just adopt the formats supported bytracing_subscriber
out of the box:full
: default format nowcompact
: what is now enabled withcompact_mode
pretty
: I would personally very appreciate having this option, it might be very helpful during debugging of Iroha and development of SDKjson
: JSON machine-readable outputSo, after all there will be only two options to configure:
level
andformat
.The text was updated successfully, but these errors were encountered: