Skip to content

Commit

Permalink
fix: some small logging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiebens committed Feb 2, 2024
1 parent 44b6b20 commit 9748955
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func Start(ctx context.Context, c *config.Config) error {
tlsAppHandler := echo.New()
tlsAppHandler.Renderer = &templates.Renderer{}
tlsAppHandler.Pre(handlers.HttpsRedirect(c.Tls))
tlsAppHandler.Use(EchoMetrics(p), EchoLogger(logger), EchoErrorHandler(), EchoRecover())
tlsAppHandler.Use(EchoMetrics(p), EchoLogger(httpLogger), EchoErrorHandler(), EchoRecover())

tlsAppHandler.Any("/*", handlers.IndexHandler(http.StatusNotFound))
tlsAppHandler.Any("/", handlers.IndexHandler(http.StatusOK))
Expand Down Expand Up @@ -302,7 +302,8 @@ func setupLogging(config config.Logging) (*zap.Logger, error) {
return nil, err
}

zap.ReplaceGlobals(logger)
globalLogger := logger.Named("ionscale")
zap.ReplaceGlobals(globalLogger)

return logger, nil
return globalLogger, nil
}

0 comments on commit 9748955

Please sign in to comment.