Hi,

The attached patch fixes the SNMP subagent so that
it obeys the syslog policy of heartbeat; 1) use logd if it's
enabled. 2) the default syslog facility is taken from the
configure option as well as lrmd, mgmtd, etc.

The current SNMP subagent produces its logs always into LOG_USER
which is hard-coded. This is not good.

This patch can be applied solely
(i.e. independent from the SNMP extention for V2),
so please consider including this patch into 2.1.3.

Regards,

-- 
Keisuke MORI
NTT DATA Intellilink Corporation
diff -r 0890907b816f snmp_subagent/hbagent.c
--- a/snmp_subagent/hbagent.c	Tue Dec 11 01:10:53 2007 +0100
+++ b/snmp_subagent/hbagent.c	Tue Dec 11 17:08:47 2007 +0900
@@ -562,7 +562,10 @@ init_heartbeat(void)
 	hb = NULL;
 
 	cl_log_set_entity("lha-snmpagent");
-	cl_log_set_facility(LOG_USER);
+	cl_log_set_facility(HA_LOG_FACILITY);
+
+	/* Use logd if it's enabled by heartbeat */
+	cl_inherit_logging_environment(0);
 
 	hb = ll_cluster_new("heartbeat");
 
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to