summaryrefslogtreecommitdiffstats
path: root/common/log.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-03 13:56:44 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-03 13:56:44 +0100
commit639cdb811c721eedf20b9f81b8cdc626b85c5f24 (patch)
tree66e27bee4973900d3bccfb8182d9ba92c40490dc /common/log.h
parent48db37c7981abfcd3fd2f3b40aeffa3208e357ea (diff)
downloadsink-639cdb811c721eedf20b9f81b8cdc626b85c5f24.tar.gz
sink-639cdb811c721eedf20b9f81b8cdc626b85c5f24.zip
Log: fixed colors, updated output format and introduced debug areas
Diffstat (limited to 'common/log.h')
-rw-r--r--common/log.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/common/log.h b/common/log.h
index e43ef0a..564c574 100644
--- a/common/log.h
+++ b/common/log.h
@@ -24,8 +24,18 @@ QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char
24} 24}
25} 25}
26 26
27#define Trace() Sink::Log::debugStream(Sink::Log::DebugLevel::Trace, __LINE__, __FILE__, Q_FUNC_INFO) 27#define DEBUG_AREA 0
28#define Log() Sink::Log::debugStream(Sink::Log::DebugLevel::Log, __LINE__, __FILE__, Q_FUNC_INFO) 28
29#define Warning() Sink::Log::debugStream(Sink::Log::DebugLevel::Warning, __LINE__, __FILE__, Q_FUNC_INFO) 29#define Trace_() Sink::Log::debugStream(Sink::Log::DebugLevel::Trace, __LINE__, __FILE__, Q_FUNC_INFO)
30#define Log_() Sink::Log::debugStream(Sink::Log::DebugLevel::Log, __LINE__, __FILE__, Q_FUNC_INFO)
31
32#define Trace_area(AREA) Sink::Log::debugStream(Sink::Log::DebugLevel::Trace, __LINE__, __FILE__, Q_FUNC_INFO, AREA)
33#define Log_area(AREA) Sink::Log::debugStream(Sink::Log::DebugLevel::Log, __LINE__, __FILE__, Q_FUNC_INFO, AREA)
34#define Warning_area(AREA) Sink::Log::debugStream(Sink::Log::DebugLevel::Warning, __LINE__, __FILE__, Q_FUNC_INFO, AREA)
35#define Error_area(AREA) Sink::Log::debugStream(Sink::Log::DebugLevel::Error, __LINE__, __FILE__, Q_FUNC_INFO, AREA)
36
37#define Trace() Sink::Log::debugStream(Sink::Log::DebugLevel::Trace, __LINE__, __FILE__, Q_FUNC_INFO, DEBUG_AREA)
38#define Log() Sink::Log::debugStream(Sink::Log::DebugLevel::Log, __LINE__, __FILE__, Q_FUNC_INFO, DEBUG_AREA)
39#define Warning() Sink::Log::debugStream(Sink::Log::DebugLevel::Warning, __LINE__, __FILE__, Q_FUNC_INFO, DEBUG_AREA)
30//FIXME Error clashes with Storage::Error and MessageQueue::Error 40//FIXME Error clashes with Storage::Error and MessageQueue::Error
31#define ErrorMsg() Sink::Log::debugStream(Sink::Log::DebugLevel::Error, __LINE__, __FILE__, Q_FUNC_INFO) 41#define ErrorMsg() Sink::Log::debugStream(Sink::Log::DebugLevel::Error, __LINE__, __FILE__, Q_FUNC_INFO, DEBUG_AREA)