diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit.erl | 4 | ||||
| -rw-r--r-- | src/rabbit_error_logger_file_h.erl | 9 | ||||
| -rw-r--r-- | src/rabbit_sasl_report_file_h.erl | 9 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index bf4cb013d2..473a218092 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -264,7 +264,9 @@ ensure_working_log_config() -> error_log_location(Type) -> case case Type of default -> error_logger:logfile(filename); - wrapper -> gen_event:call(error_logger, rabbit_error_logger_file_h, filename) + wrapper -> gen_event:call(error_logger, + rabbit_error_logger_file_h, + filename) end of {error, no_log_file} -> tty; {error, _} -> undefined; diff --git a/src/rabbit_error_logger_file_h.erl b/src/rabbit_error_logger_file_h.erl index e65bb57626..30af2f7f75 100644 --- a/src/rabbit_error_logger_file_h.erl +++ b/src/rabbit_error_logger_file_h.erl @@ -38,10 +38,11 @@ %% Used only when swapping handlers in log rotation init({{File, Suffix}, []}) -> case rabbit_misc:append_file(File, Suffix) of - ok -> ok; - Error -> rabbit_log:error("Failed to append contents of " ++ - "log file '~s' to '~s':~n~p~n", - [File, [File, Suffix], Error]) + ok -> ok; + {error, Error} -> + rabbit_log:error("Failed to append contents of " ++ + "log file '~s' to '~s':~n~p~n", + [File, [File, Suffix], Error]) end, init(File); %% Used only when swapping handlers without performing diff --git a/src/rabbit_sasl_report_file_h.erl b/src/rabbit_sasl_report_file_h.erl index befd80577b..eaf9bc09fc 100644 --- a/src/rabbit_sasl_report_file_h.erl +++ b/src/rabbit_sasl_report_file_h.erl @@ -39,10 +39,11 @@ %% log rotation init({{File, Suffix}, []}) -> case rabbit_misc:append_file(File, Suffix) of - ok -> ok; - Error -> rabbit_log:error("Failed to append contents of " ++ - "sasl log file '~s' to '~s':~n~p~n", - [File, [File, Suffix], Error]) + ok -> ok; + {error, Error} -> + rabbit_log:error("Failed to append contents of " ++ + "sasl log file '~s' to '~s':~n~p~n", + [File, [File, Suffix], Error]) end, init(File); %% Used only when swapping handlers without |
