On 8/11/06, Lars Marowsky-Bree <[EMAIL PROTECTED]> wrote:
On 2006-08-10T18:12:00, [email protected] wrote:

Hi,

besides turning down the log messages, why are we getting so many of
these in the first place...? Should the code be calling the functions
that often?

About some specific log messages:

>       if (rc != EXECRA_OK || debug_level > 0) {
>               if (signo != 0) {
> -                     lrmd_log(rc == EXECRA_OK ? LOG_DEBUG : LOG_WARNING
> +                     lrmd_debug(rc == EXECRA_OK ? LOG_DEBUG : LOG_WARNING
>                       ,       "Resource Agent (%s): pid [%d] killed by"
>                       " signal %d",   op_info(op), p->pid, signo);
>               }else if (rc == exitcode) {
> -                     lrmd_log(rc == EXECRA_OK ? LOG_DEBUG : LOG_INFO
> +                     lrmd_debug2(rc == EXECRA_OK ? LOG_DEBUG : LOG_INFO
>                       ,       "Resource Agent (%s): pid [%d] exited with"
>                       " return code %d", op_info(op), p->pid, rc);
>               }else{
> -                     lrmd_log(rc == EXECRA_OK ? LOG_DEBUG : LOG_INFO
> +                     lrmd_debug2(rc == EXECRA_OK ? LOG_DEBUG : LOG_INFO
>                       ,       "Resource Agent (%s): pid [%d] exited with"
>                       " return code %d (mapped from %d)"
>                       ,       op_info(op), p->pid, rc, exitcode);
>               }
>               if (rc != EXECRA_OK || debug_level > 1) {
> -                     lrmd_log(LOG_INFO, "Resource Agent output: [%s]"
> +                     lrmd_debug2(LOG_INFO, "Resource Agent output: [%s]"
>                       ,       op->first_line_ra_stdout);
>               }
>       }

I don't think these are good candidates for debug logging. These are
important to trace the event from the LRM to the CRM (and make sure it
wasn't lost in the middle).

Besides, the last one is protected with "debug_level > 1" already, so
lrmd_debug2() doesn't change anything.

In particular in error legs, we want logging.



> +                     lrmd_debug2(LOG_INFO, "Resource Agent output: [%s]"

Additionally any logs made with lrmd_debug* should come out as
LOG_DEBUG (not LOG_INFO)
_______________________________________________________
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