summaryrefslogtreecommitdiffstats
path: root/common/log.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-05 11:59:30 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-05 11:59:30 +0100
commite1716e503d96d4c8331fb1dc2e701f2b6df240ec (patch)
treea35d3ee0d4c81c785d04878dda6eca3b61daf1bc /common/log.h
parente903e47cb0aada785e758264168d99bc4d0ad029 (diff)
downloadsink-e1716e503d96d4c8331fb1dc2e701f2b6df240ec.tar.gz
sink-e1716e503d96d4c8331fb1dc2e701f2b6df240ec.zip
Logging cleanup
Diffstat (limited to 'common/log.h')
-rw-r--r--common/log.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/common/log.h b/common/log.h
index 8a6c295..92d6cdd 100644
--- a/common/log.h
+++ b/common/log.h
@@ -24,25 +24,32 @@ DebugLevel SINKCOMMON_EXPORT debugLevelFromName(const QByteArray &name);
24void SINKCOMMON_EXPORT setDebugOutputLevel(DebugLevel); 24void SINKCOMMON_EXPORT setDebugOutputLevel(DebugLevel);
25DebugLevel SINKCOMMON_EXPORT debugOutputLevel(); 25DebugLevel SINKCOMMON_EXPORT debugOutputLevel();
26 26
27/// Set debug areas that should be logged 27enum FilterType {
28void SINKCOMMON_EXPORT setAreas(const QByteArrayList &areas); 28 Area,
29 ApplicationName
30};
29 31
30/** 32/**
31 * Set an application name filter. 33 * Sets a debug output filter.
34 *
35 * Everything that is not matching the filter is ignored.
36 * An empty filter matches everything.
32 * 37 *
33 * Note: In case of resources the identifier is the application name. 38 * Note: In case of resources the application name is the identifier.
34 */ 39 */
35void SINKCOMMON_EXPORT setFilter(const QByteArrayList &filter); 40void SINKCOMMON_EXPORT setDebugOutputFilter(FilterType, const QByteArrayList &filter);
36 41
37/** 42/**
38 * Set an application debug output. 43 * Set the debug output fields.
39 * 44 *
40 * Currently supported are: 45 * Currently supported are:
41 * * Name: Application name used for filter. 46 * * Name: Application name used for filter.
42 * * Function: The function name: 47 * * Function: The function name:
43 * * Location: The source code location. 48 * * Location: The source code location.
49 *
50 * These are additional items to the default ones (level, area, message).
44 */ 51 */
45void SINKCOMMON_EXPORT setDebugOutput(const QByteArrayList &filter); 52void SINKCOMMON_EXPORT setDebugOutputFields(const QByteArrayList &filter);
46 53
47QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0); 54QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0);
48 55