mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
Merge log files
This commit is contained in:
@@ -230,3 +230,5 @@ func GroupIsBanPrivateChat(status int32) bool {
|
||||
}
|
||||
|
||||
const BigVersion = "v3"
|
||||
|
||||
const LogFileName = "OpenIM.log"
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user