setting GinMode to release by default. Users get confused otherwise.

pull/276/head^2
Jason Kulatunga 3 years ago
parent c6e1663f8a
commit af2523cfee

@ -13,6 +13,7 @@ import (
"net/http" "net/http"
"os" "os"
"path/filepath" "path/filepath"
"strings"
) )
type AppEngine struct { type AppEngine struct {
@ -68,6 +69,11 @@ func (ae *AppEngine) Setup(logger logrus.FieldLogger) *gin.Engine {
} }
func (ae *AppEngine) Start() error { func (ae *AppEngine) Start() error {
//set the gin mode
gin.SetMode("release")
if strings.ToLower(ae.Config.GetString("log.level")) == "debug" {
gin.SetMode("debug")
}
logger := logrus.New() logger := logrus.New()
//set default log level //set default log level

Loading…
Cancel
Save