#define LWLGD //LWLG::日志开关,注释关闭打印日志
#ifdef LWLGD
#define lwlgout qDebug().noquote()<< QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss zzz [ddd]")\
<<"["<<(int)QThread::currentThreadId()<<"]"<<" [lwlg]File"<<__FILE__<<",Line:"<<__LINE__<<">>"
#else
#define lwlgout
#endif
5.12.9中可能需要修改才能不报错
reinterpret_cast<uintptr_t>(QThread::currentThreadId())
#define LWLGD //LWLG::日志开关,注释关闭打印日志
#ifdef LWLGD
#define lwlgout qDebug().noquote()<< QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss zzz [ddd]")\
<<"["<< reinterpret_cast<uintptr_t>(QThread::currentThreadId()) <<"]"<<" [lwlg]File"<<__FILE__<<",Line:"<<__LINE__<<">>"
#else
#define lwlgout
#endif
Useage
lwlgout<<"hello world";