Skip to content

Commit

Permalink
Merge pull request #6340 from onflow/petera/reduce-access-logging
Browse files Browse the repository at this point in the history
[Access] Reduce logging on some access endpoints
  • Loading branch information
peterargue authored Aug 15, 2024
2 parents 39ae577 + 0a38a3c commit a21eca2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions engine/access/rest/middleware/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ func LoggingMiddleware(logger zerolog.Logger) mux.MiddlewareFunc {
// continue to the next handler
inner.ServeHTTP(respWriter, req)
log := logger.Info()
if respWriter.statusCode != http.StatusOK {
log = logger.Error()
}
log.Str("method", req.Method).
Str("uri", req.RequestURI).
Str("client_ip", req.RemoteAddr).
Expand Down
2 changes: 1 addition & 1 deletion engine/access/rpc/backend/backend_scripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (b *backendScripts) executeScriptLocally(
logEvent.Msg("script failed to execute locally")

default:
lg.Error().Err(err).Msg("script execution failed")
lg.Debug().Err(err).Msg("script execution failed")
b.metrics.ScriptExecutionErrorLocal()
}

Expand Down

0 comments on commit a21eca2

Please sign in to comment.