Jens Axboe | a3d741f | 2008-02-27 18:32:33 +0100 | [diff] [blame] | 1 | #ifndef FIO_LOG_H |
| 2 | #define FIO_LOG_H |
| 3 | |
Jens Axboe | bf84eac | 2010-03-19 16:41:52 +0100 | [diff] [blame] | 4 | #include <stdio.h> |
Jens Axboe | ecd6cc1 | 2011-10-04 13:54:12 +0200 | [diff] [blame] | 5 | #include <stdarg.h> |
Jens Axboe | bf84eac | 2010-03-19 16:41:52 +0100 | [diff] [blame] | 6 | |
Jens Axboe | a3d741f | 2008-02-27 18:32:33 +0100 | [diff] [blame] | 7 | extern FILE *f_out; |
| 8 | extern FILE *f_err; |
| 9 | |
Jens Axboe | 7089165 | 2013-04-15 11:40:30 +0200 | [diff] [blame] | 10 | extern int log_err(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); |
| 11 | extern int log_info(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); |
Jens Axboe | e46d809 | 2011-10-03 09:11:02 +0200 | [diff] [blame] | 12 | extern int log_valist(const char *str, va_list); |
Jens Axboe | 13755d9 | 2011-10-10 19:51:26 +0200 | [diff] [blame] | 13 | extern int log_local_buf(const char *buf, size_t); |
Vincent Kang Fu | fdd5f15 | 2013-04-26 16:56:01 -0600 | [diff] [blame] | 14 | extern int log_info_flush(void); |
Jens Axboe | a3d741f | 2008-02-27 18:32:33 +0100 | [diff] [blame] | 15 | |
Jens Axboe | 084d1c6 | 2012-03-03 20:28:07 +0100 | [diff] [blame] | 16 | enum { |
| 17 | FIO_LOG_DEBUG = 1, |
| 18 | FIO_LOG_INFO = 2, |
| 19 | FIO_LOG_ERR = 3, |
Jens Axboe | 3ad0439 | 2012-03-26 21:08:46 +0200 | [diff] [blame] | 20 | FIO_LOG_NR = 4, |
Jens Axboe | 084d1c6 | 2012-03-03 20:28:07 +0100 | [diff] [blame] | 21 | }; |
| 22 | |
Jens Axboe | 3ad0439 | 2012-03-26 21:08:46 +0200 | [diff] [blame] | 23 | extern const char *log_get_level(int level); |
| 24 | |
Jens Axboe | a3d741f | 2008-02-27 18:32:33 +0100 | [diff] [blame] | 25 | #endif |