#ifndef ERRLOG_H_
#define ERRLOG_H_

#include <stdio.h>

#ifdef __cplusplus
extern "C" {
#endif	/* __cplusplus */

enum {
	LOG_INFO		= 1,	/* 001 */
	LOG_WARNING		= 2,	/* 010 */
	LOG_ERROR		= 4,	/* 100 */

	LOG_ALL			= 7		/* 111 */
};

int set_log_file(const char *fname, unsigned int mtypes);
int set_log_stream(FILE *fp, unsigned int mtypes);
int set_log_callback(void (*func)(const char*), unsigned int mtypes);

void info(const char *str, ...);
void warning(const char *str, ...);
void error(const char *str, ...);

#ifdef __cplusplus
}
#endif	/* __cplusplus */

#endif	/* ERRLOG_H_ */
