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.
This commit is contained in:
parent
5a22a5876c
commit
da056f7cbb
1 changed files with 1 additions and 1 deletions
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue