Skip to content

Commit

Permalink
slightly better log level printing
Browse files Browse the repository at this point in the history
  • Loading branch information
factoidforrest committed Dec 16, 2021
1 parent 4372467 commit 1c98ea0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/log4shell/commands/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ func enableGlobalFlags(c *cli.Context) {
consoleOutput.FormatFieldName = func(i interface{}) string {
return fmt.Sprintf("\n\t%s: ", util.Colorize(constants.ColorBlue, i))
}


consoleOutput.FormatLevel = func(i interface{}) string {
if (i == nil){
return util.Colorize(constants.ColorBold,"Scan Result:")
}
return fmt.Sprintf("%s",i)
return fmt.Sprintf("| %-6s |", i)
}
log.Logger = log.Output(consoleOutput)

Expand Down

0 comments on commit 1c98ea0

Please sign in to comment.