Skip to content

Commit

Permalink
watchdog: update log level to avoid log spam
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tao-ren authored and facebook-github-bot committed Oct 25, 2018
1 parent cb34447 commit deb0da2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/recipes-lib/watchdog/libwatchdog-0.1/watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions common/recipes-utils/wdtcli/files/wdtcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit deb0da2

Please sign in to comment.