瀏覽代碼

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

JimMoen 2 年之前
父節點
當前提交
f381961108
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      apps/emqx/src/config/emqx_config_logger.erl

+ 7 - 0
apps/emqx/src/config/emqx_config_logger.erl

@@ -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).