with Debug X Release configurations properly in qmakefile.
INCLUDEPATH += "./"
}
+DEFINES += _HPCS_LITTLE_ENDIAN
+
+CONFIG(debug, debug|release) {
+ DEFINES += ANYANKA_DEBUG
+ message("Debug build")
+} else {
+ DEFINES += NDEBUG
+ message("Release build")
+}
+
SOURCES += main.cpp\
datafilesloader.cpp \
datamanager.cpp \
RESOURCES += \
imgresources.qrc
-
-DEFINES += _HPCS_LITTLE_ENDIAN
-
-CONFIG(release)
-{
- DEFINES += NDEBUG
-}
void Logger::log(Level level, const QString& sender, const QString& message, bool suppressPrint)
{
+#ifndef ANYANKA_DEBUG
+ if (level == Logger::Level::DEBUG)
+ return;
+#endif
LoggedInfo li = std::make_tuple(QDateTime::currentMSecsSinceEpoch(), level, sender, message);
s_globalInstance->m_lock.lock();
s_globalInstance->m_logged.push_back(li);