diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-02-27 18:32:33 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-02-27 18:32:33 +0100 |
commit | a3d741fa3bc3120d5b62a56826a97524daa32803 (patch) | |
tree | 9f792474e4cbca062176a7a7788a9691cfdfbf7d /log.h | |
parent | c0a5d35ec77fae5cfe382d35ab18915ed6766504 (diff) | |
download | fio-a3d741fa3bc3120d5b62a56826a97524daa32803.tar.gz |
Add --debug=parse for option parsing debug
Adds log.h and debug.h to split the logging and debug bits out of
fio, so that the parser can use them.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'log.h')
-rw-r--r-- | log.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#ifndef FIO_LOG_H +#define FIO_LOG_H + +extern FILE *f_out; +extern FILE *f_err; + +/* + * If logging output to a file, stderr should go to both stderr and f_err + */ +#define log_err(args...) do { \ + fprintf(f_err, ##args); \ + if (f_err != stderr) \ + fprintf(stderr, ##args); \ + } while (0) + +#define log_info(args...) fprintf(f_out, ##args) + +FILE *get_f_out(void); +FILE *get_f_err(void); + +#endif |