Improve logger API (#262)

This breaking change improves naming consistency.

- Rename LOGF to INFOF
- Rename recently introduced ANYF to LOGF
- Remove V* log calls, as they are not being used
This commit is contained in:
Paul Kulchenko 2021-09-03 21:14:26 -07:00 committed by GitHub
parent 50937be752
commit 0584684a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 174 additions and 261 deletions

View file

@ -65,9 +65,9 @@ void vflogf_onfail(FILE *f) {
* will display microseconsd as a delta elapsed time. This is useful if
* you do something like:
*
* LOGF("connecting to foo");
* INFOF("connecting to foo");
* connect(...)
* LOGF("connected to foo");
* INFOF("connected to foo");
*
* In that case, the second log entry will always display the amount of
* time that it took to connect. This is great in forking applications.
@ -101,7 +101,6 @@ void(vflogf)(unsigned level, const char *file, int line, FILE *f,
vflogf_onfail(f);
}
(vfprintf)(f, fmt, va);
va_end(va);
fputs("\n", f);
if (bufmode == _IOLBF) {
f->bufmode = _IOLBF;