diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2013-02-05 10:42:25 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2013-02-05 10:42:25 +0000 |
| commit | 5a7b5b339a592e23a216f290d08a16b114bdef8d (patch) | |
| tree | f4d62d558f488ad90b35cf070e24d2aacfd8ef6a /src/rabbit.erl | |
| parent | 819bc71fe544f8d26cf5c7c704bd7b3b663e1c5c (diff) | |
| download | rabbitmq-server-git-5a7b5b339a592e23a216f290d08a16b114bdef8d.tar.gz | |
Slightly cleaner logging at startup: don't repeat the RabbitMQ or Erlang versions, and split copyright out into its own log message since it is not like the other bits.
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 6b730fda4d..98178a6249 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -725,34 +725,29 @@ print_banner() -> log_location(kernel), log_location(sasl)]). log_banner() -> - {ok, Product} = application:get_key(id), - {ok, Version} = application:get_key(vsn), + error_logger:info_msg("~s ~s~n", + [?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE]), Settings = [{"node", node()}, {"home dir", home_dir()}, {"config file(s)", config_files()}, {"cookie hash", rabbit_nodes:cookie_hash()}, {"log", log_location(kernel)}, {"sasl log", log_location(sasl)}, - {"database dir", rabbit_mnesia:dir()}, - {"erlang version", erlang:system_info(otp_release)}], + {"database dir", rabbit_mnesia:dir()}], DescrLen = 1 + lists:max([length(K) || {K, _V} <- Settings]), Format = fun (K, V) -> rabbit_misc:format( "~-" ++ integer_to_list(DescrLen) ++ "s: ~s~n", [K, V]) end, Banner = iolist_to_binary( - rabbit_misc:format( - "~s ~s~n~s~n~s~n", - [Product, Version, ?COPYRIGHT_MESSAGE, - ?INFORMATION_MESSAGE]) ++ - [case S of - {"config file(s)" = K, []} -> - Format(K, "(none)"); - {"config file(s)" = K, [V0 | Vs]} -> - Format(K, V0), [Format("", V) || V <- Vs]; - {K, V} -> - Format(K, V) - end || S <- Settings]), + [case S of + {"config file(s)" = K, []} -> + Format(K, "(none)"); + {"config file(s)" = K, [V0 | Vs]} -> + Format(K, V0), [Format("", V) || V <- Vs]; + {K, V} -> + Format(K, V) + end || S <- Settings]), error_logger:info_msg("~s", [Banner]). home_dir() -> |
