blob: a885be7253628e28950115944cca2d937be653c7 [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)));
12extern int log_local(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
Jens Axboee46d8092011-10-03 09:11:02 +020013extern int log_valist(const char *str, va_list);
Jens Axboe13755d92011-10-10 19:51:26 +020014extern int log_local_buf(const char *buf, size_t);
Vincent Kang Fufdd5f152013-04-26 16:56:01 -060015extern int log_info_flush(void);
Jens Axboea3d741f2008-02-27 18:32:33 +010016
Jens Axboe084d1c62012-03-03 20:28:07 +010017enum {
18 FIO_LOG_DEBUG = 1,
19 FIO_LOG_INFO = 2,
20 FIO_LOG_ERR = 3,
Jens Axboe3ad04392012-03-26 21:08:46 +020021 FIO_LOG_NR = 4,
Jens Axboe084d1c62012-03-03 20:28:07 +010022};
23
Jens Axboe3ad04392012-03-26 21:08:46 +020024extern const char *log_get_level(int level);
25
Jens Axboea3d741f2008-02-27 18:32:33 +010026#endif