잘못된 import 수정 2
This commit is contained in:
parent
ff77d2b7d1
commit
437417de21
|
@ -63,12 +63,7 @@ func NewOtherLogger(
|
||||||
loglevel := zap.NewAtomicLevelAt(logLevel)
|
loglevel := zap.NewAtomicLevelAt(logLevel)
|
||||||
logWriter := rotater.NewLogWriter(logFilename, maxSizeMb, maxBackup, maxDay, logDir)
|
logWriter := rotater.NewLogWriter(logFilename, maxSizeMb, maxBackup, maxDay, logDir)
|
||||||
core := zapcore.NewCore(formatter, logWriter, loglevel)
|
core := zapcore.NewCore(formatter, logWriter, loglevel)
|
||||||
|
closer = logWriter.Close
|
||||||
if rotateSyncer, ok := logWriter.(logger.RotateSyncer); ok {
|
|
||||||
closer = rotateSyncer.Close
|
|
||||||
} else {
|
|
||||||
closer = nopCloser
|
|
||||||
}
|
|
||||||
|
|
||||||
options := []zap.Option{zap.ErrorOutput(defaultWriter)}
|
options := []zap.Option{zap.ErrorOutput(defaultWriter)}
|
||||||
logger = zap.New(core, options...).
|
logger = zap.New(core, options...).
|
||||||
|
|
Loading…
Reference in New Issue