hide gin output from normal starts (#603)

This commit is contained in:
Anbraten 2021-12-12 22:49:30 +01:00 committed by GitHub
parent 0e89923854
commit 33a657103e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,7 @@ import (
"strings"
"time"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/urfave/cli/v2"
@ -76,6 +77,8 @@ func run(c *cli.Context) error {
}
if zerolog.GlobalLevel() <= zerolog.DebugLevel {
log.Logger = log.With().Caller().Logger()
} else {
gin.SetMode(gin.ReleaseMode)
}
log.Log().Msgf("LogLevel = %s", zerolog.GlobalLevel().String())