Skip to content

Commit b3a3c10

Browse files
author
myxy99
committed
normalizeMessage
1 parent 869a8b5 commit b3a3c10

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

xlog/log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (logger *Logger) Debugf(template string, args ...interface{}) {
143143
}
144144

145145
func normalizeMessage(msg string) string {
146-
return fmt.Sprintf("%-32s", msg)
146+
return fmt.Sprintf("\t\t\t%-32s", msg)
147147
}
148148

149149
// Info ...

xlog/log.log

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2021-04-16 16:28:43 INFO xlog/api_test.go:9 test {"error": "error"}
2+
2021-04-16 16:28:43 WARN xlog/api_test.go:10 test {"error": "error"}
3+
2021-04-16 16:28:43 ERROR xlog/api_test.go:11 test {"error": "error"}
4+
2021-04-16 16:30:57 INFO xlog/api_test.go:9 test {"error": "error"}
5+
2021-04-16 16:30:57 WARN xlog/api_test.go:10 test {"error": "error"}
6+
2021-04-16 16:30:57 ERROR xlog/api_test.go:11 test {"error": "error"}
7+
2021-04-16 16:31:12 INFO xlog/api_test.go:9 test {"error": "error"}
8+
2021-04-16 16:31:12 WARN xlog/api_test.go:10 test {"error": "error"}
9+
2021-04-16 16:31:12 ERROR xlog/api_test.go:11 test {"error": "error"}
10+
2021-04-16 16:31:26 INFO xlog/api_test.go:9 test {"error": "error"}
11+
2021-04-16 16:31:26 WARN xlog/api_test.go:10 test {"error": "error"}
12+
2021-04-16 16:31:26 ERROR xlog/api_test.go:11 test {"error": "error"}

0 commit comments

Comments
 (0)