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.
master
Mike 2021-02-24 11:24:21 +01:00 committed by Michael Beaumont
parent 5a22a5876c
commit da056f7cbb
No known key found for this signature in database
GPG Key ID: 94C1243E6859F368
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ func LineBytes(prefix, format string, a ...interface{}) []byte {
} }
// Line will format a log line, and return a string // 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") { if !strings.Contains(format, "\n") {
format = fmt.Sprintf("%s%s", format, "\n") format = fmt.Sprintf("%s%s", format, "\n")
} }