mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-13 22:49:11 +00:00
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:
parent
50937be752
commit
0584684a82
13 changed files with 174 additions and 261 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue