From 906ebb97f618b3fbb402b43ea8aad024e2409504 Mon Sep 17 00:00:00 2001 From: wangxinyi7 <121973291+wangxinyi7@users.noreply.github.com> Date: Mon, 6 Feb 2023 12:58:13 -0800 Subject: [PATCH] change log level (#16128) --- agent/consul/rate/handler.go | 2 +- .../consul-container/test/ratelimit/ratelimit_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/consul/rate/handler.go b/agent/consul/rate/handler.go index 52fe2366b4..087cb83fa2 100644 --- a/agent/consul/rate/handler.go +++ b/agent/consul/rate/handler.go @@ -208,7 +208,7 @@ func (h *Handler) Allow(op Operation) error { // TODO(NET-1382): is this the correct log-level? enforced := l.mode == ModeEnforcing - h.logger.Warn("RPC exceeded allowed rate limit", + h.logger.Debug("RPC exceeded allowed rate limit", "rpc", op.Name, "source_addr", op.SourceAddr, "limit_type", l.desc, diff --git a/test/integration/consul-container/test/ratelimit/ratelimit_test.go b/test/integration/consul-container/test/ratelimit/ratelimit_test.go index 119a74f2f3..bde1b44be9 100644 --- a/test/integration/consul-container/test/ratelimit/ratelimit_test.go +++ b/test/integration/consul-container/test/ratelimit/ratelimit_test.go @@ -162,7 +162,7 @@ func TestServerRequestRateLimit(t *testing.T) { // putting this last as there are cases where logs // were not present in consumer when assertion was made. checkLogsForMessage(r, logConsumer.Msgs, - fmt.Sprintf("[WARN] agent.server.rpc-rate-limit: RPC exceeded allowed rate limit: rpc=%s", op.action.rateLimitOperation), + fmt.Sprintf("[DEBUG] agent.server.rpc-rate-limit: RPC exceeded allowed rate limit: rpc=%s", op.action.rateLimitOperation), op.action.rateLimitOperation, "exceeded", op.expectExceededLog) })