[PATCH] Log: Output parse errors to syslog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 exec/main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/exec/main.c b/exec/main.c
index 5a9ae97..65b28c2 100644
--- a/exec/main.c
+++ b/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;
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss




[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux