trikRuntime
QsLogDisableForThisFile.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QtDebug>
4 // When included AFTER QsLog.h, this file will disable logging in that C++ file. When included
5 // before, it will lead to compiler warnings or errors about macro redefinitions.
6 
7 #undef QLOG_TRACE
8 #undef QLOG_DEBUG
9 #undef QLOG_INFO
10 #undef QLOG_WARN
11 #undef QLOG_ERROR
12 #undef QLOG_FATAL
13 
14 #define QLOG_TRACE() if (1) {} else qDebug()
15 #define QLOG_DEBUG() if (1) {} else qDebug()
16 #define QLOG_INFO() if (1) {} else qDebug()
17 #define QLOG_WARN() if (1) {} else qDebug()
18 #define QLOG_ERROR() if (1) {} else qDebug()
19 #define QLOG_FATAL() if (1) {} else qDebug()