summaryrefslogtreecommitdiff
path: root/src/rabbit_sasl_report_file_h.erl
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert@lshift.net>2008-11-28 12:57:03 +0000
committerHubert Plociniczak <hubert@lshift.net>2008-11-28 12:57:03 +0000
commitaeb78210e273a65ad62630c76ffa75c047e87fec (patch)
tree22c211a345b283942bfe50f095a8afb866135874 /src/rabbit_sasl_report_file_h.erl
parentb03225948fa01e0e9b8ece91956d3fd967b06356 (diff)
downloadrabbitmq-server-aeb78210e273a65ad62630c76ffa75c047e87fec.tar.gz
Logging handlers attempt to create the directory
to the log file if it doesn't exist yet. Added new test to include the case when no write permissions are set for the directory.
Diffstat (limited to 'src/rabbit_sasl_report_file_h.erl')
-rw-r--r--src/rabbit_sasl_report_file_h.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rabbit_sasl_report_file_h.erl b/src/rabbit_sasl_report_file_h.erl
index 10e2ee6e..0c5a29f0 100644
--- a/src/rabbit_sasl_report_file_h.erl
+++ b/src/rabbit_sasl_report_file_h.erl
@@ -54,9 +54,11 @@ init({{File, _}, error}) ->
%% doing any log rotation
init({File, []}) ->
init(File);
-init({_File, _Type} = FileInfo) ->
+init({File, _Type} = FileInfo) ->
+ rabbit_misc:ensure_directory_exists(File),
sasl_report_file_h:init(FileInfo);
init(File) ->
+ rabbit_misc:ensure_directory_exists(File),
sasl_report_file_h:init({File, sasl_error_logger_type()}).
handle_event(Event, State) ->