aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndrzej Telezynski <[email protected]>2011-08-23 22:14:55 +0200
committerHenrik Nord <[email protected]>2011-08-30 15:22:20 +0200
commitf7dc3bf45367fb22ababb85a783c2e9e9a1ada00 (patch)
treebd9c6e108e6696bf13a8e436069413f0daf24d44 /lib
parent224f4324615b05e78b0a5cd3d26f8392b749086c (diff)
downloadotp-f7dc3bf45367fb22ababb85a783c2e9e9a1ada00.tar.gz
otp-f7dc3bf45367fb22ababb85a783c2e9e9a1ada00.tar.bz2
otp-f7dc3bf45367fb22ababb85a783c2e9e9a1ada00.zip
Print path to logs dir unless nofetch option specified.
Diffstat (limited to 'lib')
-rw-r--r--lib/observer/src/ttb.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/observer/src/ttb.erl b/lib/observer/src/ttb.erl
index a0fbe0d60e..072aa165e7 100644
--- a/lib/observer/src/ttb.erl
+++ b/lib/observer/src/ttb.erl
@@ -596,6 +596,15 @@ stop(Opts) when is_list(Opts) ->
?MODULE ! {stop,Fetch,self()},
receive {?MODULE,R} -> R end
end,
+ case {Fetch, Result} of
+ {nofetch, _} ->
+ ok;
+ {_, {stopped, _}} ->
+ %% Printout moved out of the ttb loop to avoid occasional deadlock
+ io:format("Stored logs in ~s~n", [element(2, Result)]);
+ {_, _} ->
+ ok
+ end,
stop_return(Result,Opts);
stop(Opts) ->
stop([Opts]).
@@ -632,8 +641,6 @@ ensure_fetch_dir(Dir) ->
stop_return(R,Opts) ->
case {lists:member(return_fetch_dir,Opts),R} of
{true,_} ->
- %%Printout moved out of the ttb loop to avoid occasional deadlock
- io:format("Stored logs in ~s~n",[element(2, R)]),
R;
{false,{stopped,_}} ->
stopped;