1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 14:28:24 +01:00

Add macro for special fine-grained logging

This commit is contained in:
Uwe L. Korn 2014-10-12 19:04:53 +01:00
parent 7b816db9ff
commit 9c243db83e
3 changed files with 15 additions and 1 deletions

View File

@ -58,12 +58,15 @@ option(BUILD_TESTS "Build Tomahawk with unit tests" ON)
option(BUILD_HATCHET "Build the Hatchet plugin" OFF)
option(BUILD_WITH_QT4 "Build Tomahawk with Qt4 no matter if Qt5 was found" ON)
option(SANITIZE_ADDRESS "Enable Address Sanitizer for memory error detection" OFF)
option(WITH_CRASHREPORTER "Build with CrashReporter" ON)
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON)
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
option(WITH_KDE4 "Build with support for KDE specific stuff" ON)
# build options for development purposes
option(SANITIZE_ADDRESS "Enable Address Sanitizer for memory error detection" OFF)
option(TOMAHAWK_FINEGRAINED_MESSAGES "Enable even more verbose logging (will hurt performance significantly" OFF)
CMAKE_DEPENDENT_OPTION(WITH_UPOWER "Build with support for UPower events" ON
"UNIX;NOT APPLE" OFF)
CMAKE_DEPENDENT_OPTION(WITH_GNOMESHORTCUTHANDLER "Build with shortcut handler for GNOME" ON

View File

@ -22,6 +22,7 @@
#include <QDebug>
#include "DllMacro.h"
#include "config.h"
#define LOGDEBUG 1
#define LOGINFO 2
@ -69,4 +70,12 @@ namespace Logger
#define tSqlLog Logger::TSqlLog
DLLEXPORT void tLogNotifyShutdown();
// Macro for messages that severely hurt performance but are helpful
// in some cases for better debugging.
#ifdef TOMAHAWK_FINEGRAINED_MESSAGES
#define FINEGRAINED_MSG(a) tDebug( LOGVERBOSE ) << a ;
#else
#define FINEGRAINED_MSG(a)
#endif
#endif // TOMAHAWK_LOGGER_H

View File

@ -22,4 +22,6 @@
#cmakedefine LIBLASTFM_FOUND
#cmakedefine QCA2_FOUND
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
#endif // CONFIG_H_IN