diff --git a/apps/emqx_conf/src/emqx_conf_schema.erl b/apps/emqx_conf/src/emqx_conf_schema.erl index 3cfb74b0e..06ec7478a 100644 --- a/apps/emqx_conf/src/emqx_conf_schema.erl +++ b/apps/emqx_conf/src/emqx_conf_schema.erl @@ -487,7 +487,7 @@ fields("node") -> #{ mapping => "vm_args.-env ERL_CRASH_DUMP", desc => ?DESC(node_crash_dump_file), - default => "log/erl_crash.dump", + default => crash_dump_file_default(), 'readOnly' => true } )}, @@ -1296,6 +1296,15 @@ sort_log_levels(Levels) -> Levels ). +crash_dump_file_default() -> + case os:getenv("RUNNER_LOG_DIR") of + false -> + %% testing, or running emqx app as deps + "log/erl_crash.dump"; + Dir -> + [filename:join([Dir, "erl_crash.dump"])] + end. + %% utils -spec conf_get(string() | [string()], hocon:config()) -> term(). conf_get(Key, Conf) -> diff --git a/apps/emqx_machine/src/emqx_machine.app.src b/apps/emqx_machine/src/emqx_machine.app.src index fdfd2b28f..c805fdd25 100644 --- a/apps/emqx_machine/src/emqx_machine.app.src +++ b/apps/emqx_machine/src/emqx_machine.app.src @@ -3,7 +3,7 @@ {id, "emqx_machine"}, {description, "The EMQX Machine"}, % strict semver, bump manually! - {vsn, "0.1.2"}, + {vsn, "0.1.3"}, {modules, []}, {registered, []}, {applications, [kernel, stdlib]},