supervise-daemon: elevate some log messages to warnings

Prior to this change, we were logging unexpected terminations of daemons
we were supervising at the info level. This change moves the logs to
warnings.
This commit is contained in:
William Hubbs 2017-10-18 18:07:50 -05:00
parent 3c8e7ed255
commit 35b1996704

View File

@ -771,17 +771,17 @@ int main(int argc, char **argv)
} else } else
respawn_count++; respawn_count++;
if (respawn_count >= respawn_max) { if (respawn_count >= respawn_max) {
syslog(LOG_INFO, "respawned \"%s\" too many times, " syslog(LOG_WARNING, "respawned \"%s\" too many times, "
"exiting", exec); "exiting", exec);
exiting = true; exiting = true;
continue; continue;
} }
} }
if (WIFEXITED(i)) if (WIFEXITED(i))
syslog(LOG_INFO, "%s, pid %d, exited with return code %d", syslog(LOG_WARNING, "%s, pid %d, exited with return code %d",
exec, child_pid, WEXITSTATUS(i)); exec, child_pid, WEXITSTATUS(i));
else if (WIFSIGNALED(i)) else if (WIFSIGNALED(i))
syslog(LOG_INFO, "%s, pid %d, terminated by signal %d", syslog(LOG_WARNING, "%s, pid %d, terminated by signal %d",
exec, child_pid, WTERMSIG(i)); exec, child_pid, WTERMSIG(i));
child_pid = fork(); child_pid = fork();
if (child_pid == -1) if (child_pid == -1)