diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2013-01-18 11:53:05 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2013-01-18 11:53:05 +0000 |
| commit | 444b5278f4d2235acc327c5b76a5b92c6e872047 (patch) | |
| tree | a6d025eaad3c8b64b7900d0996ef802dcd2321cf /src | |
| parent | e32a511f94f008b8676eb85d72655ba7de4cbd93 (diff) | |
| download | rabbitmq-server-git-444b5278f4d2235acc327c5b76a5b92c6e872047.tar.gz | |
Don't io:format the HiPE compilation warning.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit.erl | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index ef01bd8819..7ba8a6865f 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -265,12 +265,21 @@ maybe_hipe_compile() -> {ok, Want} = application:get_env(rabbit, hipe_compile), Can = code:which(hipe) =/= non_existing, case {Want, Can} of - {true, true} -> hipe_compile(); - {true, false} -> io:format("Not HiPE compiling: HiPE not found in " - "this Erlang installation.~n"); - {false, _} -> ok + {true, true} -> hipe_compile(), + true; + {true, false} -> false; + {false, _} -> true end. +warn_if_hipe_compilation_failed(true) -> + ok; +warn_if_hipe_compilation_failed(false) -> + error_logger:warning_msg( + "Not HiPE compiling: HiPE not found in this Erlang installation.~n"). + +%% HiPE compilation happens before we have log handlers and can take a +%% long time, so make an exception to our no-stdout policy and display +%% progress via stdout. hipe_compile() -> Count = length(?HIPE_WORTHY), io:format("~nHiPE compiling: |~s|~n |", @@ -320,8 +329,9 @@ start() -> boot() -> start_it(fun() -> ok = ensure_application_loaded(), - maybe_hipe_compile(), + Success = maybe_hipe_compile(), ok = ensure_working_log_handlers(), + warn_if_hipe_compilation_failed(Success), rabbit_node_monitor:prepare_cluster_status_files(), ok = rabbit_upgrade:maybe_upgrade_mnesia(), %% It's important that the consistency check happens after |
