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 /sinksh | |
parent | e903e47cb0aada785e758264168d99bc4d0ad029 (diff) | |
download | sink-e1716e503d96d4c8331fb1dc2e701f2b6df240ec.tar.gz sink-e1716e503d96d4c8331fb1dc2e701f2b6df240ec.zip |
Logging cleanup
Diffstat (limited to 'sinksh')
-rw-r--r-- | sinksh/syntax_modules/core_syntax.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sinksh/syntax_modules/core_syntax.cpp b/sinksh/syntax_modules/core_syntax.cpp index cb036b4..e90d894 100644 --- a/sinksh/syntax_modules/core_syntax.cpp +++ b/sinksh/syntax_modules/core_syntax.cpp | |||
@@ -176,7 +176,7 @@ bool setLoggingAreas(const QStringList &commands, State &state) | |||
176 | areas << c.toLatin1(); | 176 | areas << c.toLatin1(); |
177 | } | 177 | } |
178 | 178 | ||
179 | Sink::Log::setAreas(areas); | 179 | Sink::Log::setDebugOutputFilter(Sink::Log::Area, areas); |
180 | return true; | 180 | return true; |
181 | } | 181 | } |
182 | 182 | ||
@@ -192,18 +192,18 @@ bool setLoggingFilter(const QStringList &commands, State &state) | |||
192 | filter << c.toLatin1(); | 192 | filter << c.toLatin1(); |
193 | } | 193 | } |
194 | 194 | ||
195 | Sink::Log::setFilter(filter); | 195 | Sink::Log::setDebugOutputFilter(Sink::Log::ApplicationName, filter); |
196 | return true; | 196 | return true; |
197 | } | 197 | } |
198 | 198 | ||
199 | bool setLoggingOutput(const QStringList &commands, State &state) | 199 | bool setLoggingFields(const QStringList &commands, State &state) |
200 | { | 200 | { |
201 | QByteArrayList output; | 201 | QByteArrayList output; |
202 | for (const auto &c : commands) { | 202 | for (const auto &c : commands) { |
203 | output << c.toLatin1(); | 203 | output << c.toLatin1(); |
204 | } | 204 | } |
205 | 205 | ||
206 | Sink::Log::setDebugOutput(output); | 206 | Sink::Log::setDebugOutputFields(output); |
207 | return true; | 207 | return true; |
208 | } | 208 | } |
209 | 209 | ||
@@ -236,9 +236,9 @@ Syntax::List syntax() | |||
236 | Syntax loggingFilter("loggingFilter", QObject::tr("Set logging filter."), &CoreSyntax::setLoggingFilter); | 236 | Syntax loggingFilter("loggingFilter", QObject::tr("Set logging filter."), &CoreSyntax::setLoggingFilter); |
237 | set.children << loggingFilter; | 237 | set.children << loggingFilter; |
238 | 238 | ||
239 | Syntax loggingOutput("loggingOutput", QObject::tr("Set logging output."), &CoreSyntax::setLoggingFilter); | 239 | Syntax loggingFields("loggingFields", QObject::tr("Set logging fields."), &CoreSyntax::setLoggingFields); |
240 | loggingOutput.completer = [](const QStringList &, const QString &fragment, State &state) -> QStringList { return Utils::filteredCompletions(QStringList() << "name" << "function" << "location" << "", fragment, Qt::CaseInsensitive); }; | 240 | loggingFields.completer = [](const QStringList &, const QString &fragment, State &state) -> QStringList { return Utils::filteredCompletions(QStringList() << "name" << "function" << "location" << "", fragment, Qt::CaseInsensitive); }; |
241 | set.children << loggingOutput; | 241 | set.children << loggingFields; |
242 | 242 | ||
243 | syntax << set; | 243 | syntax << set; |
244 | 244 | ||