summaryrefslogtreecommitdiffstats
path: root/sinksh/syntax_modules/core_syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sinksh/syntax_modules/core_syntax.cpp')
-rw-r--r--sinksh/syntax_modules/core_syntax.cpp14
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
199bool setLoggingOutput(const QStringList &commands, State &state) 199bool 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