File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,8 @@ Usage of mev-boost:
252252 use Hoodi
253253 -json
254254 log in JSON format instead of text
255+ -color
256+ enable colored output for text log format; has no effect if JSON logging is enabled via -json
255257 -log-no-version
256258 disables adding the version to every log entry
257259 -log-service string
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ var flags = []cli.Flag{
1616 versionFlag ,
1717 // logging
1818 jsonFlag ,
19+ colorFlag ,
1920 debugFlag ,
2021 logLevelFlag ,
2122 logServiceFlag ,
6364 Usage : "log in JSON format instead of text" ,
6465 Category : LoggingCategory ,
6566 }
67+ colorFlag = & cli.BoolFlag {
68+ Name : "color" ,
69+ Sources : cli .EnvVars ("LOG_COLOR" ),
70+ Usage : "enable colored output for text log format" ,
71+ Category : LoggingCategory ,
72+ }
6673 debugFlag = & cli.BoolFlag {
6774 Name : "debug" ,
6875 Sources : cli .EnvVars ("DEBUG" ),
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ func setupLogging(cmd *cli.Command) error {
184184 log .Logger .SetFormatter (& logrus.TextFormatter {
185185 FullTimestamp : true ,
186186 TimestampFormat : config .RFC3339Milli ,
187- ForceColors : true ,
187+ ForceColors : cmd . Bool ( colorFlag . Name ) ,
188188 })
189189 }
190190
You can’t perform that action at this time.
0 commit comments