mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
时间毫秒对齐
This commit is contained in:
@ -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
|
||||
|
||||
@ -13,7 +19,7 @@ type Logger interface {
|
||||
Debugf(format string, args ...any)
|
||||
Info(args ...any)
|
||||
Infof(format string, args ...any)
|
||||
Warn(args ...any)
|
||||
Warn(args ...any)
|
||||
Warnf(format string, args ...any)
|
||||
Error(args ...any)
|
||||
Errorf(format string, args ...any)
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user