From b6cbebf87e32fb6bd6d9fb7b5d624b5aa1ad740a Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 21 Nov 2015 15:38:17 -0600 Subject: use the configured logging for error output --- src/relx.erl | 8 ++++---- 1 file 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 -> -- cgit v1.2.3