From 75f308fc3f0d019465cdaa867a6923b5d716d24f Mon Sep 17 00:00:00 2001 From: vraatikka Date: Tue, 30 Jul 2013 19:31:57 +0300 Subject: [PATCH] Changes some important messages to use skygw_log_write_flush. --- server/core/gateway.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/server/core/gateway.c b/server/core/gateway.c index 0bc85373e..db6629aea 100644 --- a/server/core/gateway.c +++ b/server/core/gateway.c @@ -370,7 +370,7 @@ char ddopt[1024]; } if (cnf_file == NULL) { - skygw_log_write( + skygw_log_write_flush( NULL, LOGFILE_ERROR, "Fatal : Unable to find a MaxScale configuration file, either " "install one in /etc/MaxScale.cnf, $MAXSCALE_HOME/etc/MaxScale.cnf " @@ -405,25 +405,31 @@ char ddopt[1024]; if (!config_load(cnf_file)) { - skygw_log_write(NULL, - LOGFILE_ERROR, - "Failed to load MaxScale configuration file %s\n", cnf_file); + skygw_log_write_flush( + NULL, + LOGFILE_ERROR, + "Failed to load MaxScale configuration file %s\n", cnf_file); exit(1); } - skygw_log_write(NULL, LOGFILE_MESSAGE, "SkySQL MaxScale (C) SkySQL Ab 2013\n"); + skygw_log_write(NULL, + LOGFILE_MESSAGE, + "SkySQL MaxScale (C) SkySQL Ab 2013\n"); skygw_log_write_flush(NULL, - LOGFILE_MESSAGE, - "MaxScale is starting, PID %i\n", - getpid()); - + LOGFILE_MESSAGE, + "MaxScale is starting, PID %i\n", + getpid()); + poll_init(); - + /* * Start the services that were created above */ n_services = serviceStartAll(); - skygw_log_write(NULL, LOGFILE_MESSAGE, "Started %i services\n", getpid()); + skygw_log_write_flush(NULL, + LOGFILE_MESSAGE, + "Started %i services\n", + getpid()); /* * Start the polling threads, note this is one less than is