Add LOG_WARN alias

Along with syslogp(), this is ia killer vendor lock-in feature.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2019-11-06 13:35:44 +01:00
parent 31d7298516
commit fc4b804a6d
7 changed files with 20 additions and 24 deletions

View File

@@ -1641,12 +1641,12 @@ void fprintlog(struct filed *f, struct buf_msg *buffer)
logit("Failure resolving %s:%s: %s\n", host, service, gai_strerror(err));
logit("Retries: %d\n", f->f_prevcount);
if (--f->f_prevcount < 0) {
flog(LOG_SYSLOG | LOG_WARNING, "Still cannot find %s, "
flog(LOG_SYSLOG | LOG_WARN, "Still cannot find %s, "
"giving up: %s", host, gai_strerror(err));
logit("Giving up.\n");
f->f_type = F_UNUSED;
} else {
flog(LOG_SYSLOG | LOG_WARNING, "Still cannot find %s, "
flog(LOG_SYSLOG | LOG_WARN, "Still cannot find %s, "
"will try again later: %s", host, gai_strerror(err));
logit("Left retries: %d\n", f->f_prevcount);
}
@@ -2606,7 +2606,7 @@ static struct filed *cfline(char *line)
err = nslookup(p, service, &ai);
if (err) {
flog(LOG_SYSLOG | LOG_WARNING, "Cannot find %s, "
flog(LOG_SYSLOG | LOG_WARN, "Cannot find %s, "
"will try again later: %s", p, gai_strerror(err));
/*
* The host might be unknown due to an inaccessible