|
|
|
@ -63,10 +63,10 @@ func loggerInit(moduleName string) *Logger {
|
|
|
|
|
}
|
|
|
|
|
func NewLfsHook(rotationTime time.Duration, maxRemainNum uint, moduleName string) logrus.Hook {
|
|
|
|
|
lfsHook := lfshook.NewHook(lfshook.WriterMap{
|
|
|
|
|
logrus.DebugLevel: initRotateLogs(rotationTime, maxRemainNum, "debug", moduleName),
|
|
|
|
|
logrus.InfoLevel: initRotateLogs(rotationTime, maxRemainNum, "info", moduleName),
|
|
|
|
|
logrus.WarnLevel: initRotateLogs(rotationTime, maxRemainNum, "warn", moduleName),
|
|
|
|
|
logrus.ErrorLevel: initRotateLogs(rotationTime, maxRemainNum, "error", moduleName),
|
|
|
|
|
logrus.DebugLevel: initRotateLogs(rotationTime, maxRemainNum, "all", moduleName),
|
|
|
|
|
logrus.InfoLevel: initRotateLogs(rotationTime, maxRemainNum, "all", moduleName),
|
|
|
|
|
logrus.WarnLevel: initRotateLogs(rotationTime, maxRemainNum, "all", moduleName),
|
|
|
|
|
logrus.ErrorLevel: initRotateLogs(rotationTime, maxRemainNum, "all", moduleName),
|
|
|
|
|
}, &nested.Formatter{
|
|
|
|
|
TimestampFormat: "2006-01-02 15:04:05.000",
|
|
|
|
|
HideKeys: false,
|
|
|
|
|