We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 376a729 commit 0aba7ffCopy full SHA for 0aba7ff
logger.go
@@ -39,6 +39,15 @@ var LogFormatter = func(values ...interface{}) (messages []interface{}) {
39
40
messages = []interface{}{source, currentTime}
41
42
+ if len(values) == 2 {
43
+ //remove the line break
44
+ currentTime = currentTime[1:]
45
+ //remove the brackets
46
+ source = fmt.Sprintf("\033[35m%v\033[0m", values[1])
47
+
48
+ messages = []interface{}{currentTime, source}
49
+ }
50
51
if level == "sql" {
52
// duration
53
messages = append(messages, fmt.Sprintf(" \033[36;1m[%.2fms]\033[0m ", float64(values[2].(time.Duration).Nanoseconds()/1e4)/100.0))
0 commit comments