change log level (#16128)

This commit is contained in:
wangxinyi7 2023-02-06 12:58:13 -08:00 committed by GitHub
parent f36f888f55
commit 8c6fac9d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ func (h *Handler) Allow(op Operation) error {
// TODO(NET-1382): is this the correct log-level? // TODO(NET-1382): is this the correct log-level?
enforced := l.mode == ModeEnforcing enforced := l.mode == ModeEnforcing
h.logger.Warn("RPC exceeded allowed rate limit", h.logger.Debug("RPC exceeded allowed rate limit",
"rpc", op.Name, "rpc", op.Name,
"source_addr", op.SourceAddr, "source_addr", op.SourceAddr,
"limit_type", l.desc, "limit_type", l.desc,

View File

@ -162,7 +162,7 @@ func TestServerRequestRateLimit(t *testing.T) {
// putting this last as there are cases where logs // putting this last as there are cases where logs
// were not present in consumer when assertion was made. // were not present in consumer when assertion was made.
checkLogsForMessage(r, logConsumer.Msgs, 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) op.action.rateLimitOperation, "exceeded", op.expectExceededLog)
}) })