Hi, I'm afraid my syslog config does not have much to do with it.
After looking into the source code I think I understand what is happening: "ocf_log" calls a shellfunc called "ha_log" (/etc/ha.d/shellfuncs), which in turn uses the "ha_logger" command if you have enabled the logd. "ha_logger" only uses the log level INFO or DEBUG, and the usage of the log-level is determined by the command line argument -D, which defaults to log level INFO. As "ha_log" does not set the command line argument, everything logged with "ocf_log" is always log level INFO. Perhaps ocf_log should call the shellfunc "ha_debug" instead of "ha_log" if the __OCF_PRIO is set to DEBUG. A better solution would be if the ha_logger command tried to evaluate the message arguments to determine the log level, thus also enabling the use of different levels to INFO and DEBUG. In the meantime I think I will call "ha_debug" directly. Best regards, Bernhard -------- Original-Nachricht -------- Datum: Wed, 28 Mar 2007 20:50:49 +0200 Von: Dejan Muhamedagic <[EMAIL PROTECTED]> An: General Linux-HA mailing list <[email protected]> Betreff: Re: [Linux-HA] ocf_log command and logging of debug output > On Wed, Mar 28, 2007 at 07:00:01PM +0200, Bernhard Limbach wrote: > > Hello, > > > > I'm using the ocf_log command in my ocf-resource-agents, e.g. something > like: > > > > ocf_log debug "blabla something I only want to see when debugging" > > > > > > I'm using logd with the following config file: > > > > ==== /etc/logd.conf ========== > > debugfile /var/log/ha-debug > > logfacility local0 > > ============================== > > > > > > I would expect to see my debug logging only in the > /var/log/ha-debug-file. But in /var/log/messages I find: > > > > Mar 28 11:11:32 node1 lrmd: [26973]: info: RA output: > (rsc_my_resource:monitor:stderr) 2007/03/28_11:11:32 DEBUG: blabla something > I only want to > see when debugging > > > I'm afraid that it depends on your syslog's config. You set the > logfacility to local0. The messages will go both ways: to the file > and to the syslog. > > > > > Please note the upper case "DEBUG", which corresponds to the __OCF_PRIO > set in /usr/lib/heartbeat/ocf-shellfuncs. The hearbeat processes use lower > case "debug" in their output and their debug-output only appears > /var/log/ha-debug, as expected. > > > > Could it be that logd does not recognise "DEBUG" as debug logging and > thus puts it to the syslog ? Or am I totally misunderstanding the concept > behind the ocf_log-command ? > > > > > > I also observed that the "debug"-setting in the ha.cf-file does not have > an influence on the ocf_log-output. > > > > > > Thank you for any ideas and regards, > > Bernhard > > -- > > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... > > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail > > _______________________________________________ > > Linux-HA mailing list > > [email protected] > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > See also: http://linux-ha.org/ReportingProblems > > -- > Dejan > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
