1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00

时间毫秒对齐

This commit is contained in:
2022-04-20 17:33:55 +08:00
parent cd163ed99b
commit 2771310fe2
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,11 @@
package logx
var std = NewLogrus()
func StandardLogger() Logger {
return std
}
// Fields type, used to pass to `WithFields`.
type Fields map[string]any

View File

@ -18,7 +18,7 @@ func NewLogrus() Logger {
logger.SetFormatter(
&nested.Formatter{
TimestampFormat: "2006-01-02 15:04:05.999",
TimestampFormat: "2006-01-02 15:04:05.000",
NoColors: false,
CustomCallerFormatter: nestedCallerFormatter,
})
@ -88,7 +88,7 @@ func (l *logrusWrpper) Errorf(format string, args ...any) {
}
func (l *logrusWrpper) Fatal(args ...any) {
l.logrus.Fatal(args)
l.logrus.Fatal(args...)
}
func (l *logrusWrpper) Fatalf(format string, args ...any) {