blob: e5093139f0c24e1e061fb638d898aa8d79869e60 [file] [log] [blame]
Jens Axboea3d741f2008-02-27 18:32:33 +01001#ifndef FIO_LOG_H
2#define FIO_LOG_H
3
Jens Axboebf84eac2010-03-19 16:41:52 +01004#include <stdio.h>
Jens Axboeecd6cc12011-10-04 13:54:12 +02005#include <stdarg.h>
Jens Axboebf84eac2010-03-19 16:41:52 +01006
Jens Axboea3d741f2008-02-27 18:32:33 +01007extern FILE *f_out;
8extern FILE *f_err;
9
Jens Axboe70891652013-04-15 11:40:30 +020010extern int log_err(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
11extern int log_info(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
Jens Axboee46d8092011-10-03 09:11:02 +020012extern int log_valist(const char *str, va_list);
Jens Axboe13755d92011-10-10 19:51:26 +020013extern int log_local_buf(const char *buf, size_t);
Vincent Kang Fufdd5f152013-04-26 16:56:01 -060014extern int log_info_flush(void);
Jens Axboea3d741f2008-02-27 18:32:33 +010015
Jens Axboe084d1c62012-03-03 20:28:07 +010016enum {
17 FIO_LOG_DEBUG = 1,
18 FIO_LOG_INFO = 2,
19 FIO_LOG_ERR = 3,
Jens Axboe3ad04392012-03-26 21:08:46 +020020 FIO_LOG_NR = 4,
Jens Axboe084d1c62012-03-03 20:28:07 +010021};
22
Jens Axboe3ad04392012-03-26 21:08:46 +020023extern const char *log_get_level(int level);
24
Jens Axboea3d741f2008-02-27 18:32:33 +010025#endif