#ifndef _LOG_H
#define _LOG_H
#include "CommLog.h"
/*
0冗余信息
1调试信息
2运行信息
3变化信息
4警告信息
5错误信息
6异常信息
7失败信息
*/
#define loglevel0
#define loglevel1
#define loglevel2
#define loglevel3
#define loglevel4
#define loglevel5
#define loglevel6
#define loglevel7
/*
inline int log0str(const char* str,char withdate=-1)
{
#ifndef loglevel0
return 0;
#else
return commlogStr(str,withdate);
#endif
}
inline int log0str2(const char* str,const char* str2,char withdate=-1)
{
#ifndef loglevel0
return 0;
#else
return commlogStr2(str,str2,withdate);
#endif
}
inline int log0int(const char* str,const int d,char withdate=-1)
{
#ifndef loglevel0
return 0;
#else
return commlogInt(str,d,withdate);
#endif
}
inline int log0strs(char withdate=-1,...)
{
#ifndef loglevel0
return 0;
#else
return commlogStrs(withdate,...);
#endif
}
*/
//extern int commlogStr(const char* str,char withdate=-1);
//extern int commlogStr2(const char* str,const char* str2,char withdate=-1);
//extern int commlogStrs(char withdate=-1,...);
//extern int commlogInt(const char* str,const int d,char withdate=-1);
#if defined(loglevel0) //被指定需要输出日志
#define log0str(a) commlogStr(a)
#define log0int(a,b) commlogInt(a,b)
#define log0str2(a,b) commlogStr2(a,b)
#define log0strs(d,a...) commlogStrs(d,##a...)
#define log0str(a,d) commlogStr(a,d)
#define log0int(a,b,d) commlogInt(a,b,d)
#define log0str2(a,b,d) commlogStr2(a,b,d)
#else //被指定不需要输出日志
#define log0str(a)
#define log0int(a)
#define log0str2(a,b)
#define log0strs(d,a...)
#define log0str(a,d)
#define log0int(a,b,d)
#define log0str2(a,b,d)
#endif
#endif //_LOG_H