Skip to content

Commit

Permalink
Disable access logging for health endpoints (#151)
Browse files Browse the repository at this point in the history
Closes #150
  • Loading branch information
moritzheiber authored and aeneasr committed Jan 23, 2020
1 parent afaabde commit 6ca0c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/server/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/ory/x/logrusx"

"github.com/julienschmidt/httprouter"
negronilogrus "github.com/meatballhat/negroni-logrus"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand All @@ -47,6 +46,7 @@ import (
"github.com/ory/x/corsx"
"github.com/ory/x/healthx"
"github.com/ory/x/metricsx"
"github.com/ory/x/reqlog"
"github.com/ory/x/tlsx"
)

Expand All @@ -66,7 +66,7 @@ func RunServe(
d.Registry().HealthHandler().SetRoutes(router, true)

n := negroni.New()
n.Use(negronilogrus.NewMiddlewareFromLogger(logger, "keto"))
n.Use(reqlog.NewMiddlewareFromLogger(logger, "keto").ExcludePaths(healthx.ReadyCheckPath, healthx.AliveCheckPath))

if tracer := d.Registry().Tracer(); tracer.IsLoaded() {
n.Use(tracer)
Expand Down

0 comments on commit 6ca0c09

Please sign in to comment.