mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 19:31:05 +00:00
hide gin output from normal starts (#603)
This commit is contained in:
parent
0e89923854
commit
33a657103e
1 changed files with 3 additions and 0 deletions
|
@ -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())
|
||||
|
||||
|
|
Loading…
Reference in a new issue