/*
 * xlru_log.h
 *
 */

#ifndef XLRU_LOG_H_
#define XLRU_LOG_H_

#define XLRU_TEST_EVN
#ifdef XLRU_TEST_EVN
#include "log.h"

#else

#include "rtlog.h"

namespace xlru_log
{

static inline void log_info(const char* fmt, ...)
{
	va_list args;
	va_start(args, fmt);
	rtlog_vprintf("XLRU", rtlog_info, fmt, args);
	va_end(args);
}

static inline void log_error(const char* fmt, ...)
{
	va_list args;
	va_start(args, fmt);
	rtlog_vprintf("XLRU", rtlog_warning|rtlog_breaking_news, fmt, args);
	va_end(args);
}


static inline void printf(const char* fmt, ...)
{
	va_list args;
	va_start(args, fmt);
	rtlog_vprintf("XLRU", rtlog_debug, fmt, args);
	va_end(args);
}

static inline void fflush_stdout()
{
}

}//namespace

using namespace xlru_log;

#endif




#endif /* XLRU_LOG_H_ */
