From 30560d3d8c7c1791d502a265bf91cdf93817c972 Mon Sep 17 00:00:00 2001 From: cody-wang-cb Date: Tue, 6 Aug 2024 11:23:25 -0400 Subject: [PATCH] making heavy logs to debug mode (#40) --- proxyd/backend.go | 2 +- proxyd/server.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proxyd/backend.go b/proxyd/backend.go index 95653eba..793c86c1 100644 --- a/proxyd/backend.go +++ b/proxyd/backend.go @@ -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), diff --git a/proxyd/server.go b/proxyd/server.go index 0c053f56..794cb4c5 100644 --- a/proxyd/server.go +++ b/proxyd/server.go @@ -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), @@ -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, @@ -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),