Lars Marowsky-Bree wrote:
> On 2006-08-10T18:12:00, linux-ha-cvs@lists.linux-ha.org 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.

AFAIK, we only want that for unexpected errors.

Monitor / status may fail with it being an expected error.


-- 
    Alan Robertson <[EMAIL PROTECTED]>

"Openness is the foundation and preservative of friendship...  Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
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