Skip to content

Commit

Permalink
ref: use logger in every environments
Browse files Browse the repository at this point in the history
  • Loading branch information
thoas committed Feb 17, 2023
1 parent 8450408 commit 6d5ecc8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/thoas/picfit"
"github.com/thoas/picfit/config"
"github.com/thoas/picfit/failure"
"github.com/thoas/picfit/logger"
"github.com/thoas/picfit/middleware"
"github.com/thoas/stats"
)
Expand Down Expand Up @@ -70,9 +69,7 @@ func (s *HTTPServer) Init() error {
router.Use(gin.Recovery())
}

if s.config.Logger.GetLevel() == logger.DevelopmentLevel {
router.Use(ginzap.Ginzap(s.processor.Logger, time.RFC3339, true))
}
router.Use(ginzap.Ginzap(s.processor.Logger, time.RFC3339, true))

if s.config.Sentry != nil {
if err := sentry.Init(sentry.ClientOptions{
Expand Down

0 comments on commit 6d5ecc8

Please sign in to comment.