Make the dprint() processing out-of-line
[fio.git] / log.h
CommitLineData
a3d741fa
JA
1#ifndef FIO_LOG_H
2#define FIO_LOG_H
3
bf84eacb
JA
4#include <stdio.h>
5
a3d741fa
JA
6extern FILE *f_out;
7extern FILE *f_err;
8
9/*
10 * If logging output to a file, stderr should go to both stderr and f_err
11 */
12#define log_err(args...) do { \
13 fprintf(f_err, ##args); \
14 if (f_err != stderr) \
15 fprintf(stderr, ##args); \
16 } while (0)
17
18#define log_info(args...) fprintf(f_out, ##args)
19
20FILE *get_f_out(void);
21FILE *get_f_err(void);
22
23#endif