#ifndef __VR_LOG__H_
#define __VR_LOG__H_

#include <stdio.h>
#include <chrono>


#define  LOG_VERBOSE(...)  	VrLogUtils::EchoLog(KELOGLEVEL_Verbose,	    "VrAPPV", ##__VA_ARGS__)
#define  LOG_DEBUG(...) 	VrLogUtils::EchoLog(KELOGLEVEL_Debug,		"VrAPPD", ##__VA_ARGS__)
#define  LOG_INFO(...)  	VrLogUtils::EchoLog(KELOGLEVEL_Info,		"VrAPPI", ##__VA_ARGS__)
#define  LOG_WARNING(...)  	VrLogUtils::EchoLog(KELOGLEVEL_Warning,		"VrAPPW", ##__VA_ARGS__)
#define  LOG_ERRO(...)  	VrLogUtils::EchoLog(KELOGLEVEL_Error,		"VrAPPE", ##__VA_ARGS__)

/// @brief
/// 日志等级
enum VrLogLevel
{
    KELOGLEVEL_None     = 0,
    KELOGLEVEL_Verbose  = 1,
    KELOGLEVEL_Debug,
    KELOGLEVEL_Info,
    KELOGLEVEL_Warning,
    KELOGLEVEL_Error,
};

enum VrLogType
{
    KELOGTYPE_None      = 0,
    KELOGTYPE_Console   = 1,
    KELOGTYPE_Log4Cpp   = 1 << 1,
    KELOGTYPE_All       = 0xff,
};

namespace VrLogUtils
{
	/// 初始化log
	void InitLog();

    /// 关闭log
    void UninitLog();

    /// 输出log
    void EchoLog(VrLogLevel eLogLevel, const char* sLogGroup, const char* sFormat, ...);

    /// 修改log level default info
    void AlterLogLevel(VrLogLevel eLogLevel);

    /// 修改log输出形式  默认都输出
    void AlterLogType(VrLogType eLogType);

};

#endif

