diff options
Diffstat (limited to 'modules/log')
-rw-r--r-- | modules/log/colors.go | 4 | ||||
-rw-r--r-- | modules/log/level.go | 2 | ||||
-rw-r--r-- | modules/log/writer.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/log/colors.go b/modules/log/colors.go index c29741634f..282d0c919e 100644 --- a/modules/log/colors.go +++ b/modules/log/colors.go @@ -378,9 +378,9 @@ func (cv *ColoredValue) Format(s fmt.State, c rune) { return } } - s.Write([]byte(*cv.colorBytes)) + s.Write(*cv.colorBytes) fmt.Fprintf(&protectedANSIWriter{w: s}, fmtString(s, c), *(cv.Value)) - s.Write([]byte(*cv.resetBytes)) + s.Write(*cv.resetBytes) } // SetColorBytes will allow a user to set the colorBytes of a colored value diff --git a/modules/log/level.go b/modules/log/level.go index 6131fcb510..4b89385fe2 100644 --- a/modules/log/level.go +++ b/modules/log/level.go @@ -101,7 +101,7 @@ func (l *Level) UnmarshalJSON(b []byte) error { switch v := tmp.(type) { case string: - *l = FromString(string(v)) + *l = FromString(v) case int: *l = FromString(Level(v).String()) default: diff --git a/modules/log/writer.go b/modules/log/writer.go index 2503f04d76..6f656c7ce1 100644 --- a/modules/log/writer.go +++ b/modules/log/writer.go @@ -203,7 +203,7 @@ func (logger *WriterLogger) createMsg(buf *[]byte, event *Event) { (&protectedANSIWriter{ w: &baw, mode: pawMode, - }).Write([]byte(msg)) + }).Write(msg) *buf = baw if event.stacktrace != "" && logger.StacktraceLevel <= event.level { |