summaryrefslogtreecommitdiffstats
path: root/modules/log/colors.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/log/colors.go')
-rw-r--r--modules/log/colors.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/log/colors.go b/modules/log/colors.go
index d8e5776735..5d56fd7390 100644
--- a/modules/log/colors.go
+++ b/modules/log/colors.go
@@ -158,15 +158,15 @@ func ColorBytes(attrs ...ColorAttribute) []byte {
return bytes
}
-var levelToColor = map[Level]string{
- TRACE: ColorString(Bold, FgCyan),
- DEBUG: ColorString(Bold, FgBlue),
- INFO: ColorString(Bold, FgGreen),
- WARN: ColorString(Bold, FgYellow),
- ERROR: ColorString(Bold, FgRed),
- CRITICAL: ColorString(Bold, BgMagenta),
- FATAL: ColorString(Bold, BgRed),
- NONE: ColorString(Reset),
+var levelToColor = map[Level][]byte{
+ TRACE: ColorBytes(Bold, FgCyan),
+ DEBUG: ColorBytes(Bold, FgBlue),
+ INFO: ColorBytes(Bold, FgGreen),
+ WARN: ColorBytes(Bold, FgYellow),
+ ERROR: ColorBytes(Bold, FgRed),
+ CRITICAL: ColorBytes(Bold, BgMagenta),
+ FATAL: ColorBytes(Bold, BgRed),
+ NONE: ColorBytes(Reset),
}
var resetBytes = ColorBytes(Reset)