Browse Source

change log level (#16128)

pull/16177/head^2
wangxinyi7 2 years ago committed by GitHub
parent
commit
906ebb97f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      agent/consul/rate/handler.go
  2. 2
      test/integration/consul-container/test/ratelimit/ratelimit_test.go

2
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,

2
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)
})

Loading…
Cancel
Save