diff options
author | June McEnroe <june@causal.agency> | 2020-08-15 16:14:21 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-15 16:14:21 -0400 |
commit | 449b0918ce9049366ea8ddb9b2569b457eb137a7 (patch) | |
tree | aa7571c94d7e9b58a2670736adfbbd74dc5f0bc5 /daemon.c | |
parent | Make log messages consistent (diff) | |
download | catsit-449b0918ce9049366ea8ddb9b2569b457eb137a7.tar.gz catsit-449b0918ce9049366ea8ddb9b2569b457eb137a7.zip |
Use only LOG_NOTICE and LOG_WARNING
These are the two priorities that go to a normal place (/var/log/messages) by default.
Diffstat (limited to '')
-rw-r--r-- | daemon.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/daemon.c b/daemon.c index faf9150..095e962 100644 --- a/daemon.c +++ b/daemon.c @@ -62,7 +62,7 @@ static void configerr(bool exit, const char *format, ...) { if (exit) { verrx(EX_DATAERR, format, ap); } else { - vsyslog(LOG_ERR, format, ap); + vsyslog(LOG_WARNING, format, ap); } va_end(ap); } @@ -266,7 +266,7 @@ int main(int argc, char *argv[]) { if (daemonize) { error = daemon(0, 0); if (error) { - syslog(LOG_ERR, "daemon: %m"); + syslog(LOG_WARNING, "daemon: %m"); return EX_OSERR; } } @@ -327,7 +327,7 @@ int main(int argc, char *argv[]) { &mask ); if (nfds < 0 && errno != EINTR) { - syslog(LOG_ERR, "ppoll: %m"); + syslog(LOG_WARNING, "ppoll: %m"); continue; } @@ -338,7 +338,7 @@ int main(int argc, char *argv[]) { snprintf(buf, sizeof(buf), "%s", line); parseControl(buf); } - if (errno != EAGAIN) syslog(LOG_ERR, "read: %m"); + if (errno != EAGAIN) syslog(LOG_WARNING, "read: %m"); } if (nfds > 0) { @@ -367,7 +367,7 @@ int main(int argc, char *argv[]) { while (0 < (pid = waitpid(-1, &status, WNOHANG))) { serviceReap(pid, status); } - if (pid < 0 && errno != ECHILD) syslog(LOG_ERR, "waitpid: %m"); + if (pid < 0 && errno != ECHILD) syslog(LOG_WARNING, "waitpid: %m"); signals[SIGCHLD] = 0; } @@ -397,7 +397,7 @@ int main(int argc, char *argv[]) { int status; pid_t pid = wait(&status); if (pid < 0) { - syslog(LOG_ERR, "wait: %m"); + syslog(LOG_WARNING, "wait: %m"); continue; } serviceReap(pid, status); |