summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index b806eb8a17..e109c10c46 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -798,10 +798,13 @@ rotate_logs() ->
%% lager_file_backend. We should use a proper API, when
%% it's added to Lager.
%%
- %% FIXME: This message is asynchronous, therefore this
- %% entire call is asynchronous: at the end of this
- %% function, we can't guaranty the rotation is completed.
- [SinkName ! {rotate, FileName} || FileName <- FileNames],
+ %% FIXME: This call is effectively asynchronous: at the
+ %% end of this function, we can't guaranty the rotation
+ %% is completed.
+ [ok = gen_event:call(SinkName,
+ {lager_file_backend, FileName},
+ rotate,
+ infinity) || FileName <- FileNames],
lager:log(SinkName, info, self(),
"Log file re-opened after forced rotation", []),
Acc