[Pacemaker] ocf_log debug ... doesn't?

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Jun 17 19:13:51 UTC 2009


Hi Florian,

On Wed, Jun 17, 2009 at 05:23:25PM +0200, Florian Haas wrote:
> Dejan,
> 
> On 2009-06-17 16:46, Dejan Muhamedagic wrote:
> >> Am I overlooking something blatantly obvious?
> > 
> > Did you try logger -p trala.debug ... ? Does that work? If so,
> > then ocf_log debug should work too. ocf_log is reduced to either
> > logger(1) or ha_logger(1) call (see .ocf-shellfuncs and
> > /etc/ha.d/shellfuncs). Unless I'm very wrong ;-)
> 
> logger -p whatever.debug works just nicely.
> 
> Now:
> ha_debug() {
>         if [ "x${HA_debug}" = "x0" ] ; then
>                 return 0
>         fi
>         if [ "x${HA_LOGD}" = "xyes" ] ; then
>                 ha_logger -t "${HA_LOGTAG}" -D "ha-debug" "$@"
>                 if [ "$?" -eq "0" ] ; then
>                         return 0
>                 fi
>         fi
>         if
>           [ -n "$HA_LOGFACILITY" ]
>         then
>           : logging through syslog
>           logger -t "$HA_LOGTAG" -p "${HA_LOGFACILITY}.debug" "${*}"
>         fi
>         if
>           [ -n "$HA_DEBUGLOG" ]
>         then
>           : appending to $HA_DEBUGLOG
>           Echo "$HA_LOGTAG:     "`hadate`"${*}" >> $HA_DEBUGLOG
>         else
>           Echo "$HA_LOGTAG:     `hadate`${*}:   ${HA_LOGFACILITY}" >&2
>         fi
> }
> 
> Where exactly does it set HA_LOGFACILITY?

It should be done by aisexec, i.e. some ais plugin. Oh, Andrew
set it to HA_logfacility :( And that in December 2007. OK, I'll
add the other one now.

Thanks,

Dejan


> Cheers,
> Florian
> 



> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker





More information about the Pacemaker mailing list