summaryrefslogtreecommitdiffstats
path: root/common/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/log.h')
-rw-r--r--common/log.h24
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
6namespace Sink { 6namespace Sink {
@@ -13,16 +13,16 @@ enum DebugLevel {
13 Error 13 Error
14}; 14};
15 15
16QByteArray SINKCOMMON_EXPORT debugLevelName(DebugLevel debugLevel); 16QByteArray SINK_EXPORT debugLevelName(DebugLevel debugLevel);
17DebugLevel SINKCOMMON_EXPORT debugLevelFromName(const QByteArray &name); 17DebugLevel 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 */
24void SINKCOMMON_EXPORT setDebugOutputLevel(DebugLevel); 24void SINK_EXPORT setDebugOutputLevel(DebugLevel);
25DebugLevel SINKCOMMON_EXPORT debugOutputLevel(); 25DebugLevel SINK_EXPORT debugOutputLevel();
26 26
27enum FilterType { 27enum 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 */
40void SINKCOMMON_EXPORT setDebugOutputFilter(FilterType, const QByteArrayList &filter); 40void SINK_EXPORT setDebugOutputFilter(FilterType, const QByteArrayList &filter);
41QByteArrayList SINKCOMMON_EXPORT debugOutputFilter(FilterType type); 41QByteArrayList 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 */
53void SINKCOMMON_EXPORT setDebugOutputFields(const QByteArrayList &filter); 53void SINK_EXPORT setDebugOutputFields(const QByteArrayList &filter);
54QByteArrayList SINKCOMMON_EXPORT debugOutputFields(); 54QByteArrayList SINK_EXPORT debugOutputFields();
55 55
56QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0); 56QDebug SINK_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0);
57 57
58struct SINKCOMMON_EXPORT TraceTime 58struct 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
64inline QDebug SINKCOMMON_EXPORT operator<<(QDebug d, const TraceTime &time) 64inline 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;