On Dec 12, 2007, at 6:46 AM, Keisuke MORI wrote:

Hi,

Dejan Muhamedagic <[EMAIL PROTECTED]> writes:
Hi,

On Tue, Dec 11, 2007 at 08:26:52PM +0900, Keisuke MORI wrote:
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.

Thanks for the patch. I can recall vaguely seeing the problem,
perhaps I even filed a bugzilla for it. Or something. My memory
isn't in the best shape today.


By grep'ing the source, there are still some hard-coded LOG_USER.
Do they also need to be fix?

In particular, send_arp.c, cl_status.c, xml_diff.c,

xml_diff.c is correct - its purely a user program - probably shouldn't be going to syslog at all

lrmadmin.c
are visible to end users, I think.



$ hg id
885e02e00632 tip
$ grep -R cl_log_set_facility * | grep LOG_USER
crm/pengine/ptest.c:    cl_log_set_facility(LOG_USER);
crm/admin/xml_diff.c:   cl_log_set_facility(LOG_USER);
fencing/test/apitest.c: cl_log_set_facility(LOG_USER);
heartbeat/libnet_util/send_arp.c: cl_log_set_facility(LOG_USER);
lib/hbclient/api_test.c:        cl_log_set_facility(LOG_USER);
lib/clplumbing/netstring_test.c:        cl_log_set_facility(LOG_USER);
lrm/admin/lrmadmin.c:   cl_log_set_facility(LOG_USER);
lrm/test/apitest.c:     cl_log_set_facility(LOG_USER);
membership/ccm/ccm_testclient.c:        cl_log_set_facility(LOG_USER);
telecom/apphbd/apphbd.c:        cl_log_set_facility(LOG_USER);
telecom/apphbd/apphbtest.c:     cl_log_set_facility(LOG_USER);
telecom/recoverymgrd/recoverymgrd.c:    cl_log_set_facility(LOG_USER);
tools/cl_status.c:      cl_log_set_facility(LOG_USER);


--
Keisuke MORI
NTT DATA Intellilink Corporation
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to