Hi Steven,

for sometime now, logging to file has been broken.

The problem is simply the order in which logsys us initialized.

logsys_config_file_set relies on logmode to be set to determine if LOG_MODE_OUTPUT_FILE is set and take proper actions.

The init order was setting the configured logmode only AFTER calling logsys_config_file_set resulting in "nothing to be done" by logsys_config_file_set.

The patch fixes the init order and makes LOG_MODE_OUTPUT_FILE work again.

Please apply ASAP.

Thanks
Fabio

--
I'm going to make him an offer he can't refuse.
Index: trunk/exec/main.c
===================================================================
--- trunk/exec/main.c   (revision 1525)
+++ trunk/exec/main.c   (working copy)
@@ -569,13 +569,14 @@
                openais_exit_error (AIS_DONE_MAINCONFIGREAD);
        }
 
+       logsys_config_facility_set ("openais", main_config.syslog_facility);
+       logsys_config_mode_set (main_config.logmode);
+
        res = logsys_config_file_set (&error_string, main_config.logfile);
        if (res == -1) {
                log_printf (LOG_LEVEL_ERROR, error_string);
                openais_exit_error (AIS_DONE_LOGSETUP);
        }
-       logsys_config_facility_set ("openais", main_config.syslog_facility);
-       logsys_config_mode_set (main_config.logmode);
 
        aisexec_uid_determine (&main_config);
 
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to