- zapLvl, ok := zapLogLevel[*logLevel]
- if !ok {
- fmt.Printf("Invalid log level %s. Must be debug, info, warn, or error.\n", *logLevel)
- os.Exit(0)
- }
-
- cores := []zapcore.Core{newStdoutCore(zapLvl)}
- l := zap.New(zapcore.NewTee(cores...))
- defer func() { _ = l.Sync() }()
- logger := l.Sugar()
-
- if !(strings.HasSuffix(*configDir, "/") || strings.HasSuffix(*configDir, "\\")) {
- *configDir = *configDir + "/"
- }