Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #299 from dottorblaster/make_gin_debug_log_configu…
Browse files Browse the repository at this point in the history
…rable

Disable gin debug logging on demand
  • Loading branch information
stefanotorresi committed Oct 4, 2021
2 parents bbcfb91 + 4ade917 commit 1d0575b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -56,7 +56,7 @@ mod-tidy:
go mod tidy

test: generate web-assets
go test -v ./...
GIN_MODE=test go test -v ./...

test-coverage:
@mkdir -p build
Expand Down
4 changes: 4 additions & 0 deletions web/app.go
Expand Up @@ -4,6 +4,7 @@ import (
"embed"
"fmt"
"net/http"
"os"
"time"

"github.com/gin-contrib/sessions"
Expand Down Expand Up @@ -48,6 +49,9 @@ func DefaultDependencies() Dependencies {
consulClient, _ := consul.DefaultClient()
engine := gin.Default()
store := cookie.NewStore([]byte("secret"))
mode := os.Getenv(gin.EnvGinMode)

gin.SetMode(mode)

araService := ara.NewAraService(araAddrDefault)
checksService := services.NewChecksService(araService)
Expand Down

0 comments on commit 1d0575b

Please sign in to comment.