diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-18 13:47:50 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-18 13:47:50 +0000 |
| commit | 1d304f6ae76d590255b02e61e3251e40d30d42f0 (patch) | |
| tree | f33f5ce76df756c6f2e9dcf507da4bf6b7b43617 /src/rabbit.erl | |
| parent | 99fefeb4fe33324b8825f6d98a488e83cda7e9fa (diff) | |
| parent | 78b440c0d9c5411afab5a0b975eab7970bc4f3d7 (diff) | |
| download | rabbitmq-server-git-1d304f6ae76d590255b02e61e3251e40d30d42f0.tar.gz | |
Merging bug23698 into default
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 22 |
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() -> |
