Merge pull request #7902 from DDDHuang/ddd_fix

fix: node info, log path only path
This commit is contained in:
zhongwencool 2022-05-10 21:47:26 +08:00 committed by GitHub
commit 0924c7dc13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
).