Put all the stdout output also in stdlog

This commit is contained in:
Andrea Mazzoleni 2015-02-03 19:35:43 +01:00
parent 3884af54ea
commit 2ac751b6d9
21 changed files with 221 additions and 216 deletions

View file

@ -29,6 +29,13 @@ void fout(const char* format, ...)
va_start(ap, format);
vfprintf(stdout, format, ap);
va_end(ap);
if (stdlog) {
va_start(ap, format);
fprintf(stdlog, "stdout: ");
vfprintf(stdlog, format, ap);
va_end(ap);
}
}
void ferr(const char* format, ...)
@ -41,7 +48,7 @@ void ferr(const char* format, ...)
if (stdlog) {
va_start(ap, format);
fprintf(stdlog, "msg: ");
fprintf(stdlog, "stderr: ");
vfprintf(stdlog, format, ap);
va_end(ap);
}
@ -53,7 +60,7 @@ void flog(const char* format, ...)
if (stdlog) {
va_start(ap, format);
fprintf(stdlog, "msg: ");
fprintf(stdlog, "stdlog: ");
vfprintf(stdlog, format, ap);
va_start(ap, format);
} else {