making heavy logs to debug mode (#40)

This commit is contained in:
cody-wang-cb 2024-08-06 11:23:25 -04:00 committed by GitHub
parent ba221ab80f
commit 30560d3d8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

@ -1328,7 +1328,7 @@ func RecordBatchRPCError(ctx context.Context, backendName string, reqs []*RPCReq
} }
func MaybeRecordErrorsInRPCRes(ctx context.Context, backendName string, reqs []*RPCReq, resBatch []*RPCRes) { func MaybeRecordErrorsInRPCRes(ctx context.Context, backendName string, reqs []*RPCReq, resBatch []*RPCRes) {
log.Info("forwarded RPC request", log.Debug("forwarded RPC request",
"backend", backendName, "backend", backendName,
"auth", GetAuthCtx(ctx), "auth", GetAuthCtx(ctx),
"req_id", GetReqID(ctx), "req_id", GetReqID(ctx),

@ -301,7 +301,7 @@ func (s *Server) HandleRPC(w http.ResponseWriter, r *http.Request) {
return !ok return !ok
} }
log.Info( log.Debug(
"received RPC request", "received RPC request",
"req_id", GetReqID(ctx), "req_id", GetReqID(ctx),
"auth", GetAuthCtx(ctx), "auth", GetAuthCtx(ctx),
@ -457,7 +457,7 @@ func (s *Server) handleBatchRPC(ctx context.Context, reqs []json.RawMessage, isL
// Take base rate limit first // Take base rate limit first
if isLimited("") { if isLimited("") {
log.Info( log.Debug(
"rate limited individual RPC in a batch request", "rate limited individual RPC in a batch request",
"source", "rpc", "source", "rpc",
"req_id", parsedReq.ID, "req_id", parsedReq.ID,
@ -470,7 +470,7 @@ func (s *Server) handleBatchRPC(ctx context.Context, reqs []json.RawMessage, isL
// Take rate limit for specific methods. // Take rate limit for specific methods.
if _, ok := s.overrideLims[parsedReq.Method]; ok && isLimited(parsedReq.Method) { if _, ok := s.overrideLims[parsedReq.Method]; ok && isLimited(parsedReq.Method) {
log.Info( log.Debug(
"rate limited specific RPC", "rate limited specific RPC",
"source", "rpc", "source", "rpc",
"req_id", GetReqID(ctx), "req_id", GetReqID(ctx),