Pārlūkot izejas kodu

不再强制输出日志文件

jys 11 mēneši atpakaļ
vecāks
revīzija
2d193eb96a
1 mainītis faili ar 0 papildinājumiem un 7 dzēšanām
  1. 0 7
      log.go

+ 0 - 7
log.go

@@ -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()
 }