fix: macro EMQX_RELEASE_EDITION when `emqx` run as standalnoe app

This commit is contained in:
JimMoen 2023-10-18 16:50:41 +08:00 committed by zhongwencool
parent 32c1f1cca6
commit f381961108
1 changed files with 7 additions and 0 deletions

View File

@ -118,6 +118,8 @@ update_log_handler({Action, {handler, Id, Mod, Conf}}) ->
end,
ok.
-ifdef(EMQX_RELEASE_EDITION).
-if(?EMQX_RELEASE_EDITION == ee).
audit(Event, ?AUDIT_HANDLER) ->
emqx_audit:log(alert, #{event => Event, from => event});
@ -128,6 +130,11 @@ audit(_, _) ->
ok.
-endif.
-else.
audit(_, _) ->
ok.
-endif.
id_for_log(console) -> "log.console";
id_for_log(Other) -> "log.file." ++ atom_to_list(Other).