|
@@ -3,7 +3,6 @@ package fslog
|
|
|
import (
|
|
|
"go.uber.org/zap"
|
|
|
"go.uber.org/zap/zapcore"
|
|
|
- "gopkg.in/natefinch/lumberjack.v2"
|
|
|
"io"
|
|
|
"os"
|
|
|
)
|
|
@@ -22,12 +21,6 @@ func init() {
|
|
|
}
|
|
|
log.cores = append(log.cores,
|
|
|
zapcore.NewCore(zapcore.NewConsoleEncoder(consoleCfg), zapcore.AddSync(os.Stdout), log.lv),
|
|
|
- zapcore.NewCore(zapcore.NewJSONEncoder(jsonCfg), zapcore.AddSync(&lumberjack.Logger{
|
|
|
- Filename: "logs/log",
|
|
|
- MaxSize: 1,
|
|
|
- MaxAge: 10,
|
|
|
- LocalTime: true,
|
|
|
- }), log.lv),
|
|
|
)
|
|
|
log.flushLogger()
|
|
|
}
|