summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-02-05 10:42:25 +0000
committerSimon MacMullen <simon@rabbitmq.com>2013-02-05 10:42:25 +0000
commit3cc52f2a7b4322316591a03a7fc564b754f24bef (patch)
treef4d62d558f488ad90b35cf070e24d2aacfd8ef6a
parent8868dfda5d4c5acead620b6797fcf2a7267857e2 (diff)
downloadrabbitmq-server-3cc52f2a7b4322316591a03a7fc564b754f24bef.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.
-rw-r--r--src/rabbit.erl27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 6b730fda..98178a62 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() ->