#ifndef LOGGER_H #define LOGGER_H #include <QApplication> #include <QFile> #include <QDebug> #include <QThread> #include <iostream> #ifndef logData #define logData "["<< __TIME__ <<"]"<<"[line:"<<__LINE__<<"]"<<"[fuction:"<<__FUNCTION__<<"]"<<"[ID:"<<QThread::currentThreadId()<<"]"// "["<<__TIME__ <<"]"<< "["<<__FILE__ <<"]"<< "[line:"<<__LINE__<<"]"<<__FUNCTION__<<"[threadID:"<<QThread::currentThreadId()<<"]" //#define logData "["<<__DATE__<< __TIME__ <<"]"<< "["<<__FILE__ <<"]"<< "[line:"<<__LINE__<<"]"<<__FUNCTION__ #define logDebug() qDebug()<<logData<<"logDebug:" #define logWarning() qWarning()<<logData<<"logWarning:" #define logError() qCritical()<<logData<<"logError:" #define logInfo() qInfo()<<logData<<"logInfo:" #endif void MessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg); #endif // LOGGER_H