From eac04b243f96b32167f4bb99b6393108b211189b Mon Sep 17 00:00:00 2001 From: Turtle Date: Sat, 5 Jun 2021 01:55:57 +0800 Subject: [PATCH] fix(relup): fix relup badfun --- src/emqx_plugins.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/emqx_plugins.erl b/src/emqx_plugins.erl index c2de5fe57..6ef3d2d21 100644 --- a/src/emqx_plugins.erl +++ b/src/emqx_plugins.erl @@ -34,6 +34,8 @@ , apply_configs/1 ]). +-export([funlog/2]). + -ifdef(TEST). -compile(export_all). -compile(nowarn_export_all). @@ -267,8 +269,7 @@ do_generate_configs(App) -> true -> Schema = cuttlefish_schema:files([SchemaFile]), Conf = cuttlefish_conf:file(ConfFile), - LogFun = fun(Key, Value) -> ?LOG(info, "~s = ~p", [string:join(Key, "."), Value]) end, - cuttlefish_generator:map(Schema, Conf, undefined, LogFun); + cuttlefish_generator:map(Schema, Conf, undefined, fun ?MODULE:funlog/2); false -> error({schema_not_found, SchemaFile}) end. @@ -411,3 +412,7 @@ plugin_type(protocol) -> protocol; plugin_type(backend) -> backend; plugin_type(bridge) -> bridge; plugin_type(_) -> feature. + + +funlog(Key, Value) -> + ?LOG(info, "~s = ~p", [string:join(Key, "."), Value]).