From deb0da2f8cb31fbd8093e883c9b6d85341ea141e Mon Sep 17 00:00:00 2001 From: Tao Ren Date: Thu, 25 Oct 2018 10:16:42 -0700 Subject: [PATCH] watchdog: update log level to avoid log spam Summary: Update "watchdog opened and started" log level to DEBUG to avoid log spam on platforms who use "wdtcli" to kick watchdog periodically. Test Plan: Booted up minipack, let it run for a few minutes and make sure "watchdog opened and started" messages disappear. Reviewed By: mikechoifb fbshipit-source-id: 6b39dccb2 --- common/recipes-lib/watchdog/libwatchdog-0.1/watchdog.c | 2 +- common/recipes-utils/wdtcli/files/wdtcli.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/recipes-lib/watchdog/libwatchdog-0.1/watchdog.c b/common/recipes-lib/watchdog/libwatchdog-0.1/watchdog.c index ec930bfd8bba..88c7de449565 100644 --- a/common/recipes-lib/watchdog/libwatchdog-0.1/watchdog.c +++ b/common/recipes-lib/watchdog/libwatchdog-0.1/watchdog.c @@ -153,7 +153,7 @@ int open_watchdog(const int auto_mode, int kick_interval) } pthread_mutex_unlock(&watchdog_lock); - syslog(LOG_INFO, "system watchdog opened and started.\n"); + syslog(LOG_DEBUG, "system watchdog opened and started.\n"); return 0; error: diff --git a/common/recipes-utils/wdtcli/files/wdtcli.c b/common/recipes-utils/wdtcli/files/wdtcli.c index c45347c3bf56..467cb71213fb 100644 --- a/common/recipes-utils/wdtcli/files/wdtcli.c +++ b/common/recipes-utils/wdtcli/files/wdtcli.c @@ -163,6 +163,9 @@ int main(int argc, char **argv) return -1; } + openlog(NULL, 0, LOG_USER); + setlogmask(LOG_UPTO(LOG_INFO)); + cmd_info = wdtcli_match_cmd(user_cmd); if (cmd_info == NULL) { fprintf(stderr,