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