mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-02 22:21:44 +00:00
Config option for JSON output formatter (#2843)
* Introduce a structured logging option * rename StructuredLog to LogFormat * add changelog entry * move log_format under log_level
This commit is contained in:
committed by
Ethan Buchman
parent
b646437ec7
commit
06225e332e
@ -54,6 +54,9 @@ var RootCmd = &cobra.Command{
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if config.LogFormat == cfg.LogFormatJSON {
|
||||
logger = log.NewTMJSONLogger(log.NewSyncWriter(os.Stdout))
|
||||
}
|
||||
logger, err = tmflags.ParseLogLevel(config.LogLevel, logger, cfg.DefaultLogLevel())
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user