logger: do not interpret encoded url as format string (#7110)

Error logger currently interprets encoded url in the error as a format string.
master
kannappanr 6 years ago committed by GitHub
parent 82af0be1aa
commit 8ee8ad777c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      cmd/logger/utils.go

@ -39,11 +39,11 @@ var (
} }
return fmt.Sprint return fmt.Sprint
}() }()
ColorFgRed = func() func(format string, a ...interface{}) string { ColorFgRed = func() func(a ...interface{}) string {
if isTerminal() { if isTerminal() {
return color.New(color.FgRed).SprintfFunc() return color.New(color.FgRed).SprintFunc()
} }
return fmt.Sprintf return fmt.Sprint
}() }()
ColorBgRed = func() func(format string, a ...interface{}) string { ColorBgRed = func() func(format string, a ...interface{}) string {
if isTerminal() { if isTerminal() {

Loading…
Cancel
Save