From 07db2ce0ef4b1151fbc5389b488afb2a6fa748ff Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Wed, 27 Oct 2021 20:00:05 +0200 Subject: [PATCH] print log levels with 3 characters --- internal/logger/logger.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/logger/logger.go b/internal/logger/logger.go index 9e591feb..d4d2fc8b 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -138,30 +138,30 @@ func writeLevel(buf *bytes.Buffer, level Level, doColor bool) { switch level { case Debug: if doColor { - buf.WriteString(color.RenderString(color.Debug.Code(), "D")) + buf.WriteString(color.RenderString(color.Debug.Code(), "DEB")) } else { - buf.WriteString("D") + buf.WriteString("DEB") } case Info: if doColor { - buf.WriteString(color.RenderString(color.Green.Code(), "I")) + buf.WriteString(color.RenderString(color.Green.Code(), "INF")) } else { - buf.WriteString("I") + buf.WriteString("INF") } case Warn: if doColor { - buf.WriteString(color.RenderString(color.Warn.Code(), "W")) + buf.WriteString(color.RenderString(color.Warn.Code(), "WAR")) } else { - buf.WriteString("W") + buf.WriteString("WAR") } case Error: if doColor { - buf.WriteString(color.RenderString(color.Error.Code(), "E")) + buf.WriteString(color.RenderString(color.Error.Code(), "ERR")) } else { - buf.WriteString("E") + buf.WriteString("ERR") } } buf.WriteByte(' ')