[PATCH 4/4] LOG: make sure the log target is enabled.

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

 



Signed-off-by: Angus Salkeld <asalkeld@xxxxxxxxxx>
---
 exec/logsys.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/exec/logsys.c b/exec/logsys.c
index d9ad129..6ed5c4f 100644
--- a/exec/logsys.c
+++ b/exec/logsys.c
@@ -226,6 +226,11 @@ static int logsys_config_file_set_unlocked (
 	}
 	logsys_file_format_get(file_format, 128);
 	qb_log_format_set(logsys_loggers[subsysid].target_id, file_format);
+
+	qb_log_ctl(logsys_loggers[subsysid].target_id,
+		   QB_LOG_CONF_ENABLED,
+		   (logsys_loggers[subsysid].mode & LOGSYS_MODE_OUTPUT_FILE));
+
 	return (0);
 }
 
@@ -725,6 +730,11 @@ static void _logsys_config_apply_per_subsys(int32_t s)
 	for (f = 0; f < logsys_loggers[s].file_idx; f++) {
 		_logsys_config_apply_per_file(s, logsys_loggers[s].files[f]);
 	}
+	if (logsys_loggers[s].target_id > 0) {
+		qb_log_ctl(logsys_loggers[s].target_id,
+			QB_LOG_CONF_ENABLED,
+			(logsys_loggers[s].mode & LOGSYS_MODE_OUTPUT_FILE));
+	}
 	logsys_loggers[s].dirty = QB_FALSE;
 }
 
-- 
1.7.10.2

_______________________________________________
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