From 9785dbcbca1a09806217e20b033a71789a89623b Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Tue, 18 Apr 2017 12:14:15 -0300 Subject: [PATCH] ldpd: fix log level of log_warn() and log_warnx() The log_warn() and log_warnx() functions indicate non-critical warnings and errors, so use LOG_ERR instead of LOG_CRIT. Keep using LOG_CRIT only in fatal() and fatalx() since these functions indicate critical errors (when the program needs to exit). Signed-off-by: Renato Westphal --- ldpd/log.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ldpd/log.c b/ldpd/log.c index 408aaeb699..fc8c995ba3 100644 --- a/ldpd/log.c +++ b/ldpd/log.c @@ -66,16 +66,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); @@ -88,7 +88,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); } -- 2.39.5