diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-09 16:14:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-09 16:14:31 +0100 |
commit | d5b4d64ca0609f65cda606d1456f4040ff008cda (patch) | |
tree | 8e700409faa481609a2e678d2dc4eb2a520b5ef1 /common/log.h | |
parent | 2b79fb7b6a4759086302c68d63731256465bc5fe (diff) | |
download | sink-d5b4d64ca0609f65cda606d1456f4040ff008cda.tar.gz sink-d5b4d64ca0609f65cda606d1456f4040ff008cda.zip |
Use Sink instead of SinkCommon
Diffstat (limited to 'common/log.h')
-rw-r--r-- | common/log.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/common/log.h b/common/log.h index bf133c4..415c7f7 100644 --- a/common/log.h +++ b/common/log.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | 2 | ||
3 | #include "sinkcommon_export.h" | 3 | #include "sink_export.h" |
4 | #include <QDebug> | 4 | #include <QDebug> |
5 | 5 | ||
6 | namespace Sink { | 6 | namespace Sink { |
@@ -13,16 +13,16 @@ enum DebugLevel { | |||
13 | Error | 13 | Error |
14 | }; | 14 | }; |
15 | 15 | ||
16 | QByteArray SINKCOMMON_EXPORT debugLevelName(DebugLevel debugLevel); | 16 | QByteArray SINK_EXPORT debugLevelName(DebugLevel debugLevel); |
17 | DebugLevel SINKCOMMON_EXPORT debugLevelFromName(const QByteArray &name); | 17 | DebugLevel SINK_EXPORT debugLevelFromName(const QByteArray &name); |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * Sets the debug output level. | 20 | * Sets the debug output level. |
21 | * | 21 | * |
22 | * Everything below is ignored. | 22 | * Everything below is ignored. |
23 | */ | 23 | */ |
24 | void SINKCOMMON_EXPORT setDebugOutputLevel(DebugLevel); | 24 | void SINK_EXPORT setDebugOutputLevel(DebugLevel); |
25 | DebugLevel SINKCOMMON_EXPORT debugOutputLevel(); | 25 | DebugLevel SINK_EXPORT debugOutputLevel(); |
26 | 26 | ||
27 | enum FilterType { | 27 | enum FilterType { |
28 | Area, | 28 | Area, |
@@ -37,8 +37,8 @@ enum FilterType { | |||
37 | * | 37 | * |
38 | * Note: In case of resources the application name is the identifier. | 38 | * Note: In case of resources the application name is the identifier. |
39 | */ | 39 | */ |
40 | void SINKCOMMON_EXPORT setDebugOutputFilter(FilterType, const QByteArrayList &filter); | 40 | void SINK_EXPORT setDebugOutputFilter(FilterType, const QByteArrayList &filter); |
41 | QByteArrayList SINKCOMMON_EXPORT debugOutputFilter(FilterType type); | 41 | QByteArrayList SINK_EXPORT debugOutputFilter(FilterType type); |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * Set the debug output fields. | 44 | * Set the debug output fields. |
@@ -50,18 +50,18 @@ QByteArrayList SINKCOMMON_EXPORT debugOutputFilter(FilterType type); | |||
50 | * | 50 | * |
51 | * These are additional items to the default ones (level, area, message). | 51 | * These are additional items to the default ones (level, area, message). |
52 | */ | 52 | */ |
53 | void SINKCOMMON_EXPORT setDebugOutputFields(const QByteArrayList &filter); | 53 | void SINK_EXPORT setDebugOutputFields(const QByteArrayList &filter); |
54 | QByteArrayList SINKCOMMON_EXPORT debugOutputFields(); | 54 | QByteArrayList SINK_EXPORT debugOutputFields(); |
55 | 55 | ||
56 | QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0); | 56 | QDebug SINK_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0); |
57 | 57 | ||
58 | struct SINKCOMMON_EXPORT TraceTime | 58 | struct SINK_EXPORT TraceTime |
59 | { | 59 | { |
60 | TraceTime(int i) : time(i){}; | 60 | TraceTime(int i) : time(i){}; |
61 | const int time; | 61 | const int time; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | inline QDebug SINKCOMMON_EXPORT operator<<(QDebug d, const TraceTime &time) | 64 | inline QDebug SINK_EXPORT operator<<(QDebug d, const TraceTime &time) |
65 | { | 65 | { |
66 | d << time.time << "[ms]"; | 66 | d << time.time << "[ms]"; |
67 | return d; | 67 | return d; |