|
@@ -48,7 +48,7 @@ func InitLog() {
|
|
fileName := path.Join(logFilePath, logFileName)
|
|
fileName := path.Join(logFilePath, logFileName)
|
|
writer, _ := rotatelogs.New(
|
|
writer, _ := rotatelogs.New(
|
|
fileName+".%Y%m%d.log",
|
|
fileName+".%Y%m%d.log",
|
|
- rotatelogs.WithMaxAge(15*24*time.Hour), // 文件最大保存时间
|
|
|
|
|
|
+ rotatelogs.WithMaxAge(5*24*time.Hour), // 文件最大保存时间
|
|
rotatelogs.WithRotationTime(24*time.Hour), // 日志切割时间间隔
|
|
rotatelogs.WithRotationTime(24*time.Hour), // 日志切割时间间隔
|
|
)
|
|
)
|
|
// 实例化
|
|
// 实例化
|