fix: log all ignore events

This commit is contained in:
EMQ-YangM 2022-05-16 12:30:48 +08:00
parent bbbfea1b5b
commit b5addf7e05
1 changed files with 12 additions and 1 deletions

View File

@ -18,6 +18,7 @@
-include("emqx_resource.hrl").
-include("emqx_resource_utils.hrl").
-include_lib("emqx/include/logger.hrl").
% API
-export([
@ -275,7 +276,17 @@ handle_event({call, From}, health_check, stopped, _Data) ->
handle_event({call, From}, health_check, _State, Data) ->
handle_health_check_event(From, Data);
% Ignore all other events
handle_event(_, _, State, Data) ->
handle_event(EventType, EventData, State, Data) ->
?SLOG(
error,
#{
msg => "ignore all other events",
event_type => EventType,
event_data => EventData,
state => State,
data => Data
}
),
{next_state, State, Data}.
%%------------------------------------------------------------------------------