summaryrefslogtreecommitdiff
path: root/usr.sbin/ifstated/log.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-03-21 12:06:57 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-03-21 12:06:57 +0000
commit04af613120330d37d48dadb9d2330ebac4e08cd4 (patch)
treefc625f356794a5765aed3e7dffc2ef781c78b5f8 /usr.sbin/ifstated/log.c
parent14a59e429dd34744b20b8917dd19908a2ac59876 (diff)
From a syslog perspective it does not make sense to log fatal and
warn with the same severity. Switch log_warn() to LOG_ERR and keep fatal() at LOG_CRIT. OK reyk@ florian@
Diffstat (limited to 'usr.sbin/ifstated/log.c')
-rw-r--r--usr.sbin/ifstated/log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ifstated/log.c b/usr.sbin/ifstated/log.c
index eb4a1bae5d8..75e4d86dadf 100644
--- a/usr.sbin/ifstated/log.c
+++ b/usr.sbin/ifstated/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.3 2016/09/02 16:21:33 benno Exp $ */
+/* $OpenBSD: log.c,v 1.4 2017/03/21 12:06:55 bluhm Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -86,16 +86,16 @@ log_warn(const char *emsg, ...)
/* best effort to even work in out of memory situations */
if (emsg == NULL)
- logit(LOG_CRIT, "%s", strerror(errno));
+ logit(LOG_ERR, "%s", strerror(errno));
else {
va_start(ap, emsg);
if (asprintf(&nfmt, "%s: %s", emsg, strerror(errno)) == -1) {
/* we tried it... */
- vlog(LOG_CRIT, emsg, ap);
- logit(LOG_CRIT, "%s", strerror(errno));
+ vlog(LOG_ERR, emsg, ap);
+ logit(LOG_ERR, "%s", strerror(errno));
} else {
- vlog(LOG_CRIT, nfmt, ap);
+ vlog(LOG_ERR, nfmt, ap);
free(nfmt);
}
va_end(ap);
@@ -108,7 +108,7 @@ log_warnx(const char *emsg, ...)
va_list ap;
va_start(ap, emsg);
- vlog(LOG_CRIT, emsg, ap);
+ vlog(LOG_ERR, emsg, ap);
va_end(ap);
}