mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
Add macro for special fine-grained logging
This commit is contained in:
@@ -58,12 +58,15 @@ option(BUILD_TESTS "Build Tomahawk with unit tests" ON)
|
|||||||
option(BUILD_HATCHET "Build the Hatchet plugin" OFF)
|
option(BUILD_HATCHET "Build the Hatchet plugin" OFF)
|
||||||
option(BUILD_WITH_QT4 "Build Tomahawk with Qt4 no matter if Qt5 was found" ON)
|
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_CRASHREPORTER "Build with CrashReporter" ON)
|
||||||
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" 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(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
||||||
option(WITH_KDE4 "Build with support for KDE specific stuff" ON)
|
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
|
CMAKE_DEPENDENT_OPTION(WITH_UPOWER "Build with support for UPower events" ON
|
||||||
"UNIX;NOT APPLE" OFF)
|
"UNIX;NOT APPLE" OFF)
|
||||||
CMAKE_DEPENDENT_OPTION(WITH_GNOMESHORTCUTHANDLER "Build with shortcut handler for GNOME" ON
|
CMAKE_DEPENDENT_OPTION(WITH_GNOMESHORTCUTHANDLER "Build with shortcut handler for GNOME" ON
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#define LOGDEBUG 1
|
#define LOGDEBUG 1
|
||||||
#define LOGINFO 2
|
#define LOGINFO 2
|
||||||
@@ -69,4 +70,12 @@ namespace Logger
|
|||||||
#define tSqlLog Logger::TSqlLog
|
#define tSqlLog Logger::TSqlLog
|
||||||
DLLEXPORT void tLogNotifyShutdown();
|
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
|
#endif // TOMAHAWK_LOGGER_H
|
||||||
|
@@ -22,4 +22,6 @@
|
|||||||
#cmakedefine LIBLASTFM_FOUND
|
#cmakedefine LIBLASTFM_FOUND
|
||||||
#cmakedefine QCA2_FOUND
|
#cmakedefine QCA2_FOUND
|
||||||
|
|
||||||
|
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
|
||||||
|
|
||||||
#endif // CONFIG_H_IN
|
#endif // CONFIG_H_IN
|
||||||
|
Reference in New Issue
Block a user