1#ifndef FIO_LOG_H 2#define FIO_LOG_H 3 4#include <stdio.h> 5#include <stdarg.h> 6 7extern FILE *f_out; 8extern FILE *f_err; 9 10extern 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_valist(const char *str, va_list); 13extern int log_local_buf(const char *buf, size_t); 14extern int log_info_flush(void); 15 16enum { 17 FIO_LOG_DEBUG = 1, 18 FIO_LOG_INFO = 2, 19 FIO_LOG_ERR = 3, 20 FIO_LOG_NR = 4, 21}; 22 23extern const char *log_get_level(int level); 24 25#endif 26