fix: filter disable file handler
This commit is contained in:
parent
c901f3a9d4
commit
428cc45c69
|
@ -161,7 +161,12 @@ tr_file_handler({HandlerName, SubConf}) ->
|
||||||
}}.
|
}}.
|
||||||
|
|
||||||
logger_file_handlers(Conf) ->
|
logger_file_handlers(Conf) ->
|
||||||
maps:to_list(conf_get("log.file", Conf, #{})).
|
lists:filter(
|
||||||
|
fun({_Name, Handler}) ->
|
||||||
|
conf_get("enable", Handler, false)
|
||||||
|
end,
|
||||||
|
maps:to_list(conf_get("log.file", Conf, #{}))
|
||||||
|
).
|
||||||
|
|
||||||
conf_get(Key, Conf) -> emqx_schema:conf_get(Key, Conf).
|
conf_get(Key, Conf) -> emqx_schema:conf_get(Key, Conf).
|
||||||
conf_get(Key, Conf, Default) -> emqx_schema:conf_get(Key, Conf, Default).
|
conf_get(Key, Conf, Default) -> emqx_schema:conf_get(Key, Conf, Default).
|
||||||
|
|
Loading…
Reference in New Issue