From a3d741fa3bc3120d5b62a56826a97524daa32803 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 27 Feb 2008 18:32:33 +0100 Subject: 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 --- log.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 log.h (limited to 'log.h') diff --git a/log.h b/log.h new file mode 100644 index 00000000..12c9a552 --- /dev/null +++ b/log.h @@ -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 -- cgit v1.2.3