Skip to content

Commit

Permalink
fix logger
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps authored May 8, 2022
1 parent 6dc1217 commit b466eb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ func (s *Server) evaluateWithCache(ctx context.Context, r *flipt.EvaluationReque
cached, ok, err := s.cache.Get(ctx, key)
if err != nil {
// if error, log and continue to evaluate
logger.WithField("request", r).WithError(err).Error("getting from cache")
logger.WithError(err).Error("getting from cache")
return s.evaluate(ctx, r)
}

if !ok {
logger.WithField("request", r).Debug("evaluate cache miss")
logger.Debug("evaluate cache miss")
resp, err := s.evaluate(ctx, r)
if err != nil {
return resp, err
Expand All @@ -79,7 +79,7 @@ func (s *Server) evaluateWithCache(ctx context.Context, r *flipt.EvaluationReque
return resp, err
}

logger.WithField("request", r).Debug("evaluate cache hit")
logger.Debug("evaluate cache hit")
return cached.(*flipt.EvaluationResponse), nil
}

Expand Down

0 comments on commit b466eb9

Please sign in to comment.