瀏覽代碼

Log: Output parse errors to syslog

When corosync was started in daemon mode and there was parse error, no
way existed how to find out what happened (this is usual situation with
systemd enabled systems). Solution seems to be output to syslog by
default.

Also redundant line with setting logsys is removed because it's no
longer needed, because FORK and THREADED mode options has no longer
effect. FORK is handled by libqb by default and THREADED mode is forced
by calling logsys_thread_start.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 13 年之前
父節點
當前提交
615d7592fb
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      exec/main.c

+ 1 - 2
exec/main.c

@@ -128,7 +128,7 @@
 #endif
 
 LOGSYS_DECLARE_SYSTEM ("corosync",
-	LOGSYS_MODE_OUTPUT_STDERR,
+	LOGSYS_MODE_OUTPUT_STDERR | LOGSYS_MODE_OUTPUT_SYSLOG,
 	LOG_DAEMON,
 	LOG_INFO);
 
@@ -1095,7 +1095,6 @@ int main (int argc, char **argv, char **envp)
 		switch (ch) {
 			case 'f':
 				background = 0;
-				logsys_config_mode_set (NULL, LOGSYS_MODE_OUTPUT_STDERR|LOGSYS_MODE_THREADED|LOGSYS_MODE_FORK);
 				break;
 			case 'p':
 				break;