Skip to content

Commit

Permalink
making heavy logs to debug mode (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-wang-cb authored Aug 6, 2024
1 parent ba221ab commit 30560d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion proxyd/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ func RecordBatchRPCError(ctx context.Context, backendName string, reqs []*RPCReq
}

func MaybeRecordErrorsInRPCRes(ctx context.Context, backendName string, reqs []*RPCReq, resBatch []*RPCRes) {
log.Info("forwarded RPC request",
log.Debug("forwarded RPC request",
"backend", backendName,
"auth", GetAuthCtx(ctx),
"req_id", GetReqID(ctx),
Expand Down
6 changes: 3 additions & 3 deletions proxyd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (s *Server) HandleRPC(w http.ResponseWriter, r *http.Request) {
return !ok
}

log.Info(
log.Debug(
"received RPC request",
"req_id", GetReqID(ctx),
"auth", GetAuthCtx(ctx),
Expand Down Expand Up @@ -457,7 +457,7 @@ func (s *Server) handleBatchRPC(ctx context.Context, reqs []json.RawMessage, isL

// Take base rate limit first
if isLimited("") {
log.Info(
log.Debug(
"rate limited individual RPC in a batch request",
"source", "rpc",
"req_id", parsedReq.ID,
Expand All @@ -470,7 +470,7 @@ func (s *Server) handleBatchRPC(ctx context.Context, reqs []json.RawMessage, isL

// Take rate limit for specific methods.
if _, ok := s.overrideLims[parsedReq.Method]; ok && isLimited(parsedReq.Method) {
log.Info(
log.Debug(
"rate limited specific RPC",
"source", "rpc",
"req_id", GetReqID(ctx),
Expand Down

0 comments on commit 30560d3

Please sign in to comment.