gongshangguo
2022-02-25 5cf6309c132fdf1e110fb23f419e6971c63f533c
logger.go
@@ -37,7 +37,7 @@
   FatalLevel
)
func InitLogger(logPath string, logLevel int,maxSize int, maxBackups int, maxAge int) {
func InitLogger(logPath string, logLevel int,maxSize int, maxBackups int, maxAge int) *zap.SugaredLogger {
   logdir := "./logger/"
   logName := ""
   if index := strings.LastIndex(logPath, "/"); index != -1 {
@@ -99,6 +99,7 @@
      logger: log.Sugar(),
   }
   blog.logger.Info("init logger success")
   return blog.logger
}
func getZapLevel(logLevel int) zapcore.Level {