summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-01-18 13:47:50 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-01-18 13:47:50 +0000
commit1d304f6ae76d590255b02e61e3251e40d30d42f0 (patch)
treef33f5ce76df756c6f2e9dcf507da4bf6b7b43617 /src/rabbit.erl
parent99fefeb4fe33324b8825f6d98a488e83cda7e9fa (diff)
parent78b440c0d9c5411afab5a0b975eab7970bc4f3d7 (diff)
downloadrabbitmq-server-git-1d304f6ae76d590255b02e61e3251e40d30d42f0.tar.gz
Merging bug23698 into default
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 954e289bd4..3cfba03e01 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -373,6 +373,14 @@ home_dir() ->
Other -> Other
end.
+config_files() ->
+ case init:get_argument(config) of
+ {ok, Files} -> [filename:absname(
+ filename:rootname(File, ".config") ++ ".config") ||
+ File <- Files];
+ error -> []
+ end.
+
%---------------------------------------------------------------------------
print_banner() ->
@@ -398,14 +406,24 @@ print_banner() ->
Settings = [{"node", node()},
{"app descriptor", app_location()},
{"home dir", home_dir()},
+ {"config file(s)", config_files()},
{"cookie hash", rabbit_misc:cookie_hash()},
{"log", log_location(kernel)},
{"sasl log", log_location(sasl)},
{"database dir", rabbit_mnesia:dir()},
{"erlang version", erlang:system_info(version)}],
DescrLen = 1 + lists:max([length(K) || {K, _V} <- Settings]),
- Format = "~-" ++ integer_to_list(DescrLen) ++ "s: ~s~n",
- lists:foreach(fun ({K, V}) -> io:format(Format, [K, V]) end, Settings),
+ Format = fun (K, V) ->
+ io:format("~-" ++ integer_to_list(DescrLen) ++ "s: ~s~n",
+ [K, V])
+ end,
+ lists:foreach(fun ({"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, Settings),
io:nl().
ensure_working_log_handlers() ->