aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric <[email protected]>2012-10-19 17:51:32 -0500
committerJordan Wilberding <[email protected]>2012-10-24 11:30:00 -0600
commit4b675b9c9681e49ce4d5c0eef8c152e36e93b1f8 (patch)
tree2970281f300fb70675def7bbf23fe0e5235bfd44
parenta7716890640a3d26b633219795008f3f2561d419 (diff)
downloadrelx-4b675b9c9681e49ce4d5c0eef8c152e36e93b1f8.tar.gz
relx-4b675b9c9681e49ce4d5c0eef8c152e36e93b1f8.tar.bz2
relx-4b675b9c9681e49ce4d5c0eef8c152e36e93b1f8.zip
add a bit of additional logging information
Signed-off-by: Jordan Wilberding <[email protected]>
-rw-r--r--src/rcl_cmd_args.erl8
-rw-r--r--src/rcl_prv_assembler.erl4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/rcl_cmd_args.erl b/src/rcl_cmd_args.erl
index f12d216..ab073a2 100644
--- a/src/rcl_cmd_args.erl
+++ b/src/rcl_cmd_args.erl
@@ -32,8 +32,8 @@
-spec args2state({error, Reason::term()} | {[getopt:option()], [string()]}) ->
{ok, {rcl_state:t(), [string()]}} |
relcool:error().
-args2state(Error={error, _}) ->
- Error;
+args2state({error, Detail}) ->
+ ?RCL_ERROR({opt_parse, Detail});
args2state({ok, {Opts, Targets}}) ->
RelName = proplists:get_value(relname, Opts, undefined),
RelVsn = proplists:get_value(relvsn, Opts, undefined),
@@ -52,6 +52,10 @@ args2state({ok, {Opts, Targets}}) ->
end.
-spec format_error(Reason::term()) -> iolist().
+format_error({opt_parse, {invalid_option, Opt}}) ->
+ io_lib:format("invalid option ~s~n", [Opt]);
+format_error({opt_parse, Arg}) ->
+ io_lib:format("~p~n", [Arg]);
format_error({invalid_option_arg, Arg}) ->
case Arg of
{goals, Goal} ->
diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl
index d3fe4ad..a118b12 100644
--- a/src/rcl_prv_assembler.erl
+++ b/src/rcl_prv_assembler.erl
@@ -235,10 +235,14 @@ make_boot_script(State, Release, OutputDir, RelDir) ->
[ReleaseFile, Options]),
case make_script(Name, Options) of
ok ->
+ rcl_log:error(rcl_state:log(State),
+ "release successfully created!"),
{ok, State};
error ->
?RCL_ERROR({release_script_generation_error, ReleaseFile});
{ok, _, []} ->
+ rcl_log:error(rcl_state:log(State),
+ "release successfully created!"),
{ok, State};
{ok,Module,Warnings} ->
?RCL_ERROR({release_script_generation_warn, Module, Warnings});