文件名称:C++日志模块DLL,源码
文件大小:7KB
文件格式:RAR
更新时间:2019-08-11 10:48:21
C++ 日志模块 Dll QT版本 //xxxx.h //log level #define LL_DEBUG 0 #define LL_INFO 1 #define LL_WARN 2 #define LL_ERROR 3 #define LL_ALARM 4 #define GetCurFileName (__FILE__) #define GetCurCodeLine (__LINE__) #define GetCurCodeFunctionName (__FUNCTION__) #define Write_Log(LEVEL, FMTLOG) WriteLog(LEVEL, FMTLOG, GetCurFileName, GetCurCodeLine, GetCurCodeFunctionName) void WriteLog(int, QString, QString, int, QString); //xxxx.cpp void WriteLog(int loglevel, QString strlogstr, QString strfilename, int iline, QString strfunname) { QString g_logdllpath(g_runPath + "/dependences/LoggingModeDLL.dll"); HINSTANCE hDll = LoadLibrary(g_logdllpath.toStdWString().data()); typedef int (__cdecl *MYFUNC)(int, char*, char*, int, char*); MYFUNC execfunc = (MYFUNC)GetProcAddress(hDll, "WriteLog"); execfunc(loglevel, const_cast
【文件预览】:
LoggingModal
----CMakeLists.txt(947B)
----UnitTest()
--------CmakeLists.txt(166B)
--------UnitTest.cpp(2KB)
----LogOpration()
--------LogOprationCpp()
--------LogOprationHeader()