chore: using standard log format

This commit is contained in:
JianBo He 2022-07-01 12:02:17 +08:00
parent f8c90452cc
commit a78a389206
3 changed files with 14 additions and 3 deletions

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_resource, [
{description, "An OTP application"},
{vsn, "0.1.0"},
{description, "Manager for all external resources"},
{vsn, "0.1.1"},
{registered, []},
{mod, {emqx_resource_app, []}},
{applications, [

View File

@ -0,0 +1,7 @@
%% -*- mode: erlang -*-
%% Unless you know what you are doing, DO NOT edit manually!!
{VSN,
[{"0.1.0",[{load_module,emqx_resource_manager,brutal_purge,soft_purge,[]}]}
],
[{"0.1.0",[{load_module,emqx_resource_manager,brutal_purge,soft_purge,[]}]}
]}.

View File

@ -484,7 +484,11 @@ handle_connected_health_check(Data) ->
Actions = [{state_timeout, ?HEALTHCHECK_INTERVAL, health_check}],
{keep_state, UpdatedData, Actions};
(Status, UpdatedData) ->
logger:error("health check for ~p failed: ~p", [Data#data.id, Status]),
?SLOG(error, #{
msg => health_check_failed,
id => Data#data.id,
status => Status
}),
{next_state, Status, UpdatedData}
end
).