Skip to content

Commit

Permalink
log messages updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dadrus committed Oct 6, 2023
1 parent f650fbb commit e2e6edd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions internal/handler/decision/request_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ type requestContext struct {
}

func (r *requestContext) Finalize(_ rule.Backend) error {
logger := zerolog.Ctx(r.AppContext())
logger.Debug().Msg("Finalizing request")

if err := r.PipelineError(); err != nil {
return err
}

zerolog.Ctx(r.AppContext()).Debug().Msg("Creating response")

uh := r.UpstreamHeaders()
for k := range uh {
r.rw.Header().Set(k, uh.Get(k))
Expand Down
4 changes: 2 additions & 2 deletions internal/handler/envoyextauth/grpcv3/request_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ func (s *RequestContext) AddCookieForUpstream(name, value string) { s.upstreamCo
func (s *RequestContext) Signer() heimdall.JWTSigner { return s.jwtSigner }

func (s *RequestContext) Finalize() (*envoy_auth.CheckResponse, error) {
zerolog.Ctx(s.ctx).Debug().Msg("Finalizing request")

if s.err != nil {
return nil, s.err
}

zerolog.Ctx(s.ctx).Debug().Msg("Creating response")

headers := make([]*envoy_core.HeaderValueOption,
len(s.upstreamHeaders)+x.IfThenElse(len(s.upstreamCookies) == 0, 0, 1))
hidx := 0
Expand Down
1 change: 0 additions & 1 deletion internal/handler/proxy/request_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func newContextFactory(

func (r *requestContext) Finalize(upstream rule.Backend) error {
logger := zerolog.Ctx(r.AppContext())
logger.Debug().Msg("Finalizing request")

if err := r.PipelineError(); err != nil {
return err
Expand Down

0 comments on commit e2e6edd

Please sign in to comment.