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

Disable gin debug logging on demand #299

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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