diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-05 11:59:30 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-05 11:59:30 +0100 |
commit | e1716e503d96d4c8331fb1dc2e701f2b6df240ec (patch) | |
tree | a35d3ee0d4c81c785d04878dda6eca3b61daf1bc /common/log.cpp | |
parent | e903e47cb0aada785e758264168d99bc4d0ad029 (diff) | |
download | sink-e1716e503d96d4c8331fb1dc2e701f2b6df240ec.tar.gz sink-e1716e503d96d4c8331fb1dc2e701f2b6df240ec.zip |
Logging cleanup
Diffstat (limited to 'common/log.cpp')
-rw-r--r-- | common/log.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/common/log.cpp b/common/log.cpp index ee28a3b..d2e5f47 100644 --- a/common/log.cpp +++ b/common/log.cpp | |||
@@ -142,17 +142,19 @@ Sink::Log::DebugLevel Sink::Log::debugOutputLevel() | |||
142 | return debugLevelFromName(qgetenv("SINKDEBUGLEVEL")); | 142 | return debugLevelFromName(qgetenv("SINKDEBUGLEVEL")); |
143 | } | 143 | } |
144 | 144 | ||
145 | void Sink::Log::setFilter(const QByteArrayList &filter) | 145 | void Sink::Log::setDebugOutputFilter(FilterType type, const QByteArrayList &filter) |
146 | { | 146 | { |
147 | qputenv("SINKDEBUGFILTER", filter.join(',')); | 147 | switch (type) { |
148 | } | 148 | case ApplicationName: |
149 | 149 | qputenv("SINKDEBUGFILTER", filter.join(',')); | |
150 | void Sink::Log::setAreas(const QByteArrayList &filter) | 150 | break; |
151 | { | 151 | case Area: |
152 | qputenv("SINKDEBUGAREAS", filter.join(',')); | 152 | qputenv("SINKDEBUGAREAS", filter.join(',')); |
153 | break; | ||
154 | } | ||
153 | } | 155 | } |
154 | 156 | ||
155 | void Sink::Log::setDebugOutput(const QByteArrayList &output) | 157 | void Sink::Log::setDebugOutputFields(const QByteArrayList &output) |
156 | { | 158 | { |
157 | qputenv("SINKDEBUGOUTPUT", output.join(',')); | 159 | qputenv("SINKDEBUGOUTPUT", output.join(',')); |
158 | } | 160 | } |