From 6926865c7c5ca7dac6be8a78ece469add7b14b92 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Thu, 4 Sep 2008 14:02:11 +0100 Subject: Perform standard handler installation when original handler was not installed correcly or terminated with an error. --- src/rabbit_error_logger_file_h.erl | 4 ++++ src/rabbit_sasl_report_file_h.erl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/rabbit_error_logger_file_h.erl b/src/rabbit_error_logger_file_h.erl index 30af2f7f..d67b02ef 100644 --- a/src/rabbit_error_logger_file_h.erl +++ b/src/rabbit_error_logger_file_h.erl @@ -45,6 +45,10 @@ init({{File, Suffix}, []}) -> [File, [File, Suffix], Error]) end, init(File); +%% Used only when swapping handlers and the original handler +%% failed to terminate or was never installed +init({{File, _}, error}) -> + init(File); %% Used only when swapping handlers without performing %% log rotation init({File, []}) -> diff --git a/src/rabbit_sasl_report_file_h.erl b/src/rabbit_sasl_report_file_h.erl index eaf9bc09..3374d63d 100644 --- a/src/rabbit_sasl_report_file_h.erl +++ b/src/rabbit_sasl_report_file_h.erl @@ -46,6 +46,10 @@ init({{File, Suffix}, []}) -> [File, [File, Suffix], Error]) end, init(File); +%% Used only when swapping handlers and the original handler +%% failed to terminate or was never installed +init({{File, _}, error}) -> + init(File); %% Used only when swapping handlers without %% doing any log rotation init({File, []}) -> -- cgit v1.2.1