Add empty <netinet/tcp.h> for Windows
[fio.git] / t / log.c
... / ...
CommitLineData
1#include <stdio.h>
2#include <stdarg.h>
3
4int log_err(const char *format, ...)
5{
6 char buffer[1024];
7 va_list args;
8 size_t len;
9
10 va_start(args, format);
11 len = vsnprintf(buffer, sizeof(buffer), format, args);
12 va_end(args);
13
14 return fwrite(buffer, len, 1, stderr);
15}
16
17int log_info(const char *format, ...)
18{
19 char buffer[1024];
20 va_list args;
21 size_t len;
22
23 va_start(args, format);
24 len = vsnprintf(buffer, sizeof(buffer), format, args);
25 va_end(args);
26
27 return fwrite(buffer, len, 1, stdout);
28}