diff options
Diffstat (limited to 'common/log.h')
-rw-r--r-- | common/log.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/log.h b/common/log.h index be5a508..8266fdb 100644 --- a/common/log.h +++ b/common/log.h | |||
@@ -85,12 +85,15 @@ SINK_EXPORT inline QDebug operator<<(QDebug d, const TraceTime &time) | |||
85 | d << time.time << "[ms]"; | 85 | d << time.time << "[ms]"; |
86 | return d; | 86 | return d; |
87 | } | 87 | } |
88 | |||
89 | SINK_EXPORT bool isFiltered(DebugLevel debugLevel, const char *debugArea, const char *debugComponent, const char *file); | ||
90 | |||
88 | } | 91 | } |
89 | } | 92 | } |
90 | 93 | ||
91 | static const char *getComponentName() { return nullptr; } | 94 | static const char *getComponentName() { return nullptr; } |
92 | 95 | ||
93 | #define SINK_DEBUG_STREAM_IMPL(LEVEL, AREA, COMPONENT) Sink::Log::debugStream(LEVEL, __LINE__, __FILE__, Q_FUNC_INFO, AREA, COMPONENT) | 96 | #define SINK_DEBUG_STREAM_IMPL(LEVEL, AREA, COMPONENT) if (!Sink::Log::isFiltered(LEVEL, AREA, COMPONENT, __FILE__)) Sink::Log::debugStream(LEVEL, __LINE__, __FILE__, Q_FUNC_INFO, AREA, COMPONENT) |
94 | 97 | ||
95 | #define Trace_area(AREA) SINK_DEBUG_STREAM_IMPL(Sink::Log::DebugLevel::Trace, AREA, nullptr) | 98 | #define Trace_area(AREA) SINK_DEBUG_STREAM_IMPL(Sink::Log::DebugLevel::Trace, AREA, nullptr) |
96 | #define Log_area(AREA) SINK_DEBUG_STREAM_IMPL(Sink::Log::DebugLevel::Log, AREA, nullptr) | 99 | #define Log_area(AREA) SINK_DEBUG_STREAM_IMPL(Sink::Log::DebugLevel::Log, AREA, nullptr) |