aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-11-21 15:38:17 -0600
committerTristan Sloughter <[email protected]>2015-11-21 15:39:34 -0600
commitb6cbebf87e32fb6bd6d9fb7b5d624b5aa1ad740a (patch)
treeff1a240a09d3cc0bae34c785045d82ab5444a765 /src
parent19f89dd8db3389f49baba88fe1d66742bce6cf4f (diff)
downloadrelx-b6cbebf87e32fb6bd6d9fb7b5d624b5aa1ad740a.tar.gz
relx-b6cbebf87e32fb6bd6d9fb7b5d624b5aa1ad740a.tar.bz2
relx-b6cbebf87e32fb6bd6d9fb7b5d624b5aa1ad740a.zip
use the configured logging for error output
Diffstat (limited to 'src')
-rw-r--r--src/relx.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/relx.erl b/src/relx.erl
index d2dd797..8027fd4 100644
--- a/src/relx.erl
+++ b/src/relx.erl
@@ -70,7 +70,7 @@ main(ApiOptions, Args) ->
end,
case Result of
{error, _} ->
- report_error(rlx_state:caller(rlx_state:new([], undefined),
+ report_error(rlx_state:caller(rlx_state:new([], [{caller, command_line}], undefined),
command_line),
Result);
_ ->
@@ -327,13 +327,13 @@ usage() ->
report_error(State, Error) ->
case Error of
{error, {relx, {opt_parse, _}}} ->
- io:format(standard_error, format_error(Error), []),
+ ec_cmd_log:error(rlx_state:log(State), format_error(Error), []),
usage();
{error, {rlx_cmd_args, _}} ->
- io:format(standard_error, format_error(Error), []),
+ ec_cmd_log:error(rlx_state:log(State), format_error(Error), []),
usage();
_ ->
- io:format(standard_error, format_error(Error), [])
+ ec_cmd_log:error(rlx_state:log(State), format_error(Error), [])
end,
case rlx_state:caller(State) of
command_line ->