fix: node info, log path only path

This commit is contained in:
DDDHuang 2022-05-10 16:03:18 +08:00
parent 841acb7828
commit 76102714aa
2 changed files with 2 additions and 2 deletions

View File

@ -302,7 +302,7 @@ log_path() ->
get_log_path(Configs).
get_log_path([#{config := #{file := Path}} | _LoggerConfigs]) ->
Path;
filename:dirname(Path);
get_log_path([_LoggerConfig | LoggerConfigs]) ->
get_log_path(LoggerConfigs);
get_log_path([]) ->

View File

@ -75,7 +75,7 @@ t_log_path(_) ->
{ok, NodeInfo} = emqx_mgmt_api_test_util:request_api(get, NodePath),
#{<<"log_path">> := Path} = emqx_json:decode(NodeInfo, [return_maps]),
?assertEqual(
<<"emqx-test.log">>,
<<"log">>,
filename:basename(Path)
).