Skip to content

Commit

Permalink
chore: remove logger on /healthz
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan-pad committed Apr 24, 2024
1 parent f82b959 commit 0b2a55f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions internal/datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ func (s *Datastore) Exec() {
authz.SetAudience("burrito")
log.Infof("starting burrito datastore...")
e := echo.New()
e.Use(middleware.Logger())

healthz := e.Group("/healthz")
healthz.GET("", handleHealthz)

api := e.Group("/api")
api.Use(middleware.Logger())
api.Use(authz.Process)
api.GET("/logs", s.API.GetLogsHandler)
api.PUT("/logs", s.API.PutLogsHandler)
Expand Down
13 changes: 7 additions & 6 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func (s *Server) Exec() {
s.Webhook.Client = s.client
log.Infof("starting burrito server...")
e := echo.New()
e.Use(middleware.Logger())
e.Use(middleware.StaticWithConfig(
middleware.StaticConfig{
Filesystem: s.staticAssets,
Expand All @@ -75,12 +74,14 @@ func (s *Server) Exec() {
HTML5: true,
},
))
api := e.Group("/api")
api.Use(middleware.Logger())
e.GET("/healthz", handleHealthz)
e.POST("/api/webhook", s.Webhook.GetHttpHandler())
e.GET("/api/layers", s.API.LayersHandler)
e.GET("/api/repositories", s.API.RepositoriesHandler)
e.GET("/api/logs/:namespace/:layer/:run/:attempt", s.API.GetLogsHandler)
e.GET("/api/run/:namespace/:layer/:run/attempts", s.API.GetAttemptsHandler)
api.POST("/webhook", s.Webhook.GetHttpHandler())
api.GET("/layers", s.API.LayersHandler)
api.GET("/repositories", s.API.RepositoriesHandler)
api.GET("/logs/:namespace/:layer/:run/:attempt", s.API.GetLogsHandler)
api.GET("/run/:namespace/:layer/:run/attempts", s.API.GetAttemptsHandler)

e.Logger.Fatal(e.Start(s.config.Server.Addr))
log.Infof("burrito server started on addr %s", s.config.Server.Addr)
Expand Down

0 comments on commit 0b2a55f

Please sign in to comment.