From 5138cb12e4b0635fe62f8027b9e31e238e3e4803 Mon Sep 17 00:00:00 2001 From: jmusico Date: Thu, 21 Oct 2021 20:59:05 +0000 Subject: [PATCH] Reduce log rates for daemon-ocf This change will change a few info logs, making them debug level. To be able to check these logs, HA_debug=1 variable shall be added to each process ocf script. Test Plan: PASS: Verify that selected logs to be changed to debug are not logged as info anymore PASS: Verify after enabling debug level logs these logs are correctly logged as debug Failure Path: PASS: Verify logs are not logged if variable is removed or set to 0 Regression: PASS: Verify system install PASS: Verify all log levels, other than debug, are still being generated (related to task 43606) Story: 2009272 Task: 43728 Signed-off-by: jmusico Change-Id: Ie58683054fd6e60ee5ae496cb823d9ae956251cd --- mtce/src/hwmon/scripts/ocf/hwmon | 6 +++++- mtce/src/scripts/mtcAgent | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mtce/src/hwmon/scripts/ocf/hwmon b/mtce/src/hwmon/scripts/ocf/hwmon index 14f52a20..aea04698 100644 --- a/mtce/src/hwmon/scripts/ocf/hwmon +++ b/mtce/src/hwmon/scripts/ocf/hwmon @@ -473,7 +473,11 @@ case ${__OCF_ACTION} in ;; esac -ocf_log info "hwmond:${__OCF_ACTION} action" +if [ ${__OCF_ACTION} = "monitor" ] ; then + ocf_log debug "hwmond:${__OCF_ACTION} action" +else + ocf_log info "hwmond:${__OCF_ACTION} action" +fi # Anything except meta-data and help must pass validation hwmond_validate || exit $? diff --git a/mtce/src/scripts/mtcAgent b/mtce/src/scripts/mtcAgent index 6e75ace2..80602985 100755 --- a/mtce/src/scripts/mtcAgent +++ b/mtce/src/scripts/mtcAgent @@ -497,7 +497,11 @@ case ${__OCF_ACTION} in ;; esac -ocf_log info "mtcAgent:${__OCF_ACTION} action" +if [ ${__OCF_ACTION} = "monitor" ] ; then + ocf_log debug "mtcAgent:${__OCF_ACTION} action" +else + ocf_log info "mtcAgent:${__OCF_ACTION} action" +fi # Anything except meta-data and help must pass validation mtcAgent_validate || exit $?