Merge pull request #12513 from SergeTupchiy/EMQX-11530-info-for-flooding-log-events
fix: set `info` level for potentially flooding log events
This commit is contained in:
commit
2f7a939067
|
@ -184,7 +184,7 @@ log_result(#{username := Username}, Topic, Action, From, Result) ->
|
|||
end,
|
||||
case Result of
|
||||
allow -> ?SLOG(info, (LogMeta())#{msg => "authorization_permission_allowed"});
|
||||
deny -> ?SLOG(warning, (LogMeta())#{msg => "authorization_permission_denied"})
|
||||
deny -> ?SLOG(info, (LogMeta())#{msg => "authorization_permission_denied"})
|
||||
end.
|
||||
|
||||
%% @private Format authorization rules source.
|
||||
|
|
|
@ -613,7 +613,7 @@ process_publish(Packet = ?PUBLISH_PACKET(QoS, Topic, PacketId), Channel) ->
|
|||
do_publish(PacketId, Msg, NChannel);
|
||||
{error, Rc = ?RC_NOT_AUTHORIZED, NChannel} ->
|
||||
?SLOG(
|
||||
warning,
|
||||
info,
|
||||
#{
|
||||
msg => "cannot_publish_to_topic",
|
||||
reason => emqx_reason_codes:name(Rc)
|
||||
|
@ -632,7 +632,7 @@ process_publish(Packet = ?PUBLISH_PACKET(QoS, Topic, PacketId), Channel) ->
|
|||
end;
|
||||
{error, Rc = ?RC_QUOTA_EXCEEDED, NChannel} ->
|
||||
?SLOG(
|
||||
warning,
|
||||
info,
|
||||
#{
|
||||
msg => "cannot_publish_to_topic",
|
||||
reason => emqx_reason_codes:name(Rc)
|
||||
|
|
|
@ -63,7 +63,7 @@ handle_event(ClientInfo, {dropped, Msg, #{reason := queue_full, logctx := Ctx}})
|
|||
ok = inc_pd('send_msg.dropped', 1),
|
||||
ok = inc_pd('send_msg.dropped.queue_full', 1),
|
||||
?SLOG(
|
||||
warning,
|
||||
info,
|
||||
Ctx#{
|
||||
msg => "dropped_msg_due_to_mqueue_is_full",
|
||||
payload => Msg#message.payload
|
||||
|
|
|
@ -85,7 +85,7 @@ check(_ConnInfo, AckProps) ->
|
|||
{ok, #{max_connections := MaxClients}} ->
|
||||
case check_max_clients_exceeded(MaxClients) of
|
||||
true ->
|
||||
?SLOG(error, #{msg => "connection_rejected_due_to_license_limit_reached"}),
|
||||
?SLOG(info, #{msg => "connection_rejected_due_to_license_limit_reached"}),
|
||||
{stop, {error, ?RC_QUOTA_EXCEEDED}};
|
||||
false ->
|
||||
{ok, AckProps}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Change level of several flooding log events from warning to info.
|
Loading…
Reference in New Issue