[PATCH] Log: Use threaded mode for syslog and file log

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

 



Syslog and file log can block, so it's good idea to use libqb threaded
mode to prevent it.

Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 exec/logsys.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/exec/logsys.c b/exec/logsys.c
index 6ed5c4f..ed16bc7 100644
--- a/exec/logsys.c
+++ b/exec/logsys.c
@@ -230,6 +230,7 @@ static int logsys_config_file_set_unlocked (
 	qb_log_ctl(logsys_loggers[subsysid].target_id,
 		   QB_LOG_CONF_ENABLED,
 		   (logsys_loggers[subsysid].mode & LOGSYS_MODE_OUTPUT_FILE));
+	qb_log_ctl(logsys_loggers[subsysid].target_id, QB_LOG_CONF_THREADED, QB_TRUE);
 
 	return (0);
 }
@@ -355,6 +356,7 @@ int _logsys_system_setup(
 	} else {
 		qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_ENABLED, QB_FALSE);
 	}
+	qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_THREADED, QB_TRUE);
 	qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_PRIORITY_BUMP, LOG_INFO - LOG_DEBUG);
 
 	qb_log_filter_ctl(QB_LOG_BLACKBOX, QB_LOG_FILTER_ADD,
-- 
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