From da056f7cbbdfe219a2910b6269b1676b55acac30 Mon Sep 17 00:00:00 2001 From: Mike <2266568+michaelbeaumont@users.noreply.github.com> Date: Wed, 24 Feb 2021 11:24:21 +0100 Subject: [PATCH] Allow the `Line` formatter to be overridden This allows parity with `0.1.0` + `Color = true` using `"github.com/fatih/color"` to set the color instead of prepending with the log level. --- logger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logger.go b/logger.go index 29b5c12..51acbf0 100644 --- a/logger.go +++ b/logger.go @@ -102,7 +102,7 @@ func LineBytes(prefix, format string, a ...interface{}) []byte { } // Line will format a log line, and return a string -func Line(prefix, format string, a ...interface{}) string { +var Line = func(prefix, format string, a ...interface{}) string { if !strings.Contains(format, "\n") { format = fmt.Sprintf("%s%s", format, "\n") }