From 5b80cf3032d8bbe57de3b82dc2a831c8dcfba570 Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Thu, 30 Oct 2014 21:19:26 +0200 Subject: [PATCH] If opening any of the log files fail, MaxScale doesn't start before the cause has been removed. Added informative error message which is to be printed to standard error output. --- log_manager/log_manager.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/log_manager/log_manager.cc b/log_manager/log_manager.cc index 56bcb5588..9caafc676 100644 --- a/log_manager/log_manager.cc +++ b/log_manager/log_manager.cc @@ -2431,9 +2431,16 @@ static bool filewriter_init( NULL); } - if (fw->fwr_file[id] == NULL) { + if (fw->fwr_file[id] == NULL) + { + fprintf(stderr, + "Error : opening %s failed, %s. Exiting " + "MaxScale\n", + lf->lf_full_file_name, + strerror(errno)); goto return_succp; } + if (lf->lf_enabled) { start_msg_str = strdup("---\tLogging is enabled.\n"); } else {