diff options
| author | Matthias Radestock <matthias@lshift.net> | 2009-09-30 06:48:04 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2009-09-30 06:48:04 +0100 |
| commit | 9e6524bdbf83bd7c6ba746181f242700e765eb46 (patch) | |
| tree | 55722a965432902282e05b8fcd0c2ff226a48a10 /src/rabbit.erl | |
| parent | f83fd775aa396088172cf9641f14fb8f3b39e32b (diff) | |
| parent | ef14e003116cec8bd99fa360994477f977e4f1ad (diff) | |
| download | rabbitmq-server-git-9e6524bdbf83bd7c6ba746181f242700e765eb46.tar.gz | |
merge default into bug20399
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index ef1e004996..b098fd5a27 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -215,6 +215,16 @@ log_location(Type) -> _ -> undefined end. +app_location() -> + {ok, Application} = application:get_application(), + filename:absname(code:where_is_file(atom_to_list(Application) ++ ".app")). + +home_dir() -> + case init:get_argument(home) of + {ok, [[Home]]} -> Home; + Other -> Other + end. + %--------------------------------------------------------------------------- print_banner() -> @@ -237,10 +247,13 @@ print_banner() -> [Product, string:right([$v|Version], ProductLen), ?PROTOCOL_VERSION_MAJOR, ?PROTOCOL_VERSION_MINOR, ?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE]), - Settings = [{"node", node()}, - {"log", log_location(kernel)}, - {"sasl log", log_location(sasl)}, - {"database dir", rabbit_mnesia:dir()}], + Settings = [{"node", node()}, + {"app descriptor", app_location()}, + {"home dir", home_dir()}, + {"cookie hash", rabbit_misc:cookie_hash()}, + {"log", log_location(kernel)}, + {"sasl log", log_location(sasl)}, + {"database dir", rabbit_mnesia:dir()}], DescrLen = 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), |
