diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-04-18 12:14:15 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-06-05 12:18:58 -0300 | 
| commit | 9785dbcbca1a09806217e20b033a71789a89623b (patch) | |
| tree | a1627d3d44f469dfba7db80f97fb0d05d5f1eaf5 /ldpd | |
| parent | 0b4d8f1e38ea1dbade4d2f714775608b379e992e (diff) | |
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 <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd')
| -rw-r--r-- | ldpd/log.c | 10 | 
1 files 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);  }  | 
