From 96d61cf5f80a8917b66c73eb41a8ec4fd1773f2e Mon Sep 17 00:00:00 2001 From: Hakan Nilsson Date: Mon, 23 Nov 2020 15:43:02 +0100 Subject: [PATCH] Improved logging --- src/rebar_relx.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rebar_relx.erl b/src/rebar_relx.erl index ee3bfae4..4cc935aa 100644 --- a/src/rebar_relx.erl +++ b/src/rebar_relx.erl @@ -77,21 +77,23 @@ read_relx_config(State, Options) -> "" -> case {rebar_state:get(State, relx, []), file:consult("relx.config")} of {[], {ok, Config}} -> - ?DEBUG("Using relx.config", []), + ?DEBUG("Configuring releases with relx.config", []), Config; {Config, {error, enoent}} -> - ?DEBUG("Using relx config from rebar.config", []), + ?DEBUG("Configuring releases the {relx, ...} entry" + " from rebar.config", []), Config; {_, {error, Reason}} -> erlang:error(?PRV_ERROR({config_file, "relx.config", Reason})); {RebarConfig, {ok, _RelxConfig}} -> - ?WARN("Found conflicting relx configs, using rebar.config", []), + ?WARN("Found conflicting relx configs, configuring releases" + " with rebar.config", []), RebarConfig end; ConfigFile -> case file:consult(ConfigFile) of {ok, Config} -> - ?DEBUG("Using relx config file: ~p", [ConfigFile]), + ?DEBUG("Configuring releases with: ~ts", [ConfigFile]), Config; {error, Reason} -> erlang:error(?PRV_ERROR({config_file, ConfigFile, Reason})) @@ -106,7 +108,7 @@ format_error(unknown_vsn) -> format_error(all_relup) -> "Option --all can not be applied to `relup` command"; format_error({config_file, Filename, Error}) -> - io_lib:format("Failed to read config file ~s: ~p", [Filename, Error]); + io_lib:format("Failed to read config file ~ts: ~p", [Filename, Error]); format_error(Error) -> io_lib:format("~p", [Error]).