mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
refs #348, enabled logging in core as describes in the issue
https://dev.vatsim-germany.org/issues/348#note-2
This commit is contained in:
committed by
Roland Winklmeier
parent
355d08d7e3
commit
ea72c0f2e4
@@ -45,9 +45,9 @@ namespace BlackMiscTest
|
|||||||
|
|
||||||
// log
|
// log
|
||||||
//! \todo make thread safe or ..?
|
//! \todo make thread safe or ..?
|
||||||
// CLogSubscriber messageSubscriber;
|
CLogSubscriber messageSubscriber;
|
||||||
// messageSubscriber.enableConsoleOutput(true);
|
messageSubscriber.enableConsoleOutput(true);
|
||||||
// messageSubscriber.changeSubscription(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo));
|
messageSubscriber.changeSubscription(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo));
|
||||||
|
|
||||||
QTextStream qtout(stdout);
|
QTextStream qtout(stdout);
|
||||||
qtout << "Running on server here " << Tool::getPid() << " thread: " << QThread::currentThreadId() << endl;
|
qtout << "Running on server here " << Tool::getPid() << " thread: " << QThread::currentThreadId() << endl;
|
||||||
@@ -104,8 +104,8 @@ namespace BlackMiscTest
|
|||||||
{
|
{
|
||||||
line = line.replace("level", "").trimmed();
|
line = line.replace("level", "").trimmed();
|
||||||
CStatusMessage::StatusSeverity severity = CStatusMessage::stringToSeverity(line);
|
CStatusMessage::StatusSeverity severity = CStatusMessage::stringToSeverity(line);
|
||||||
// messageSubscriber.changeSubscription(CLogPattern().withSeverityAtOrAbove(severity));
|
messageSubscriber.changeSubscription(CLogPattern().withSeverityAtOrAbove(severity));
|
||||||
qtout << "Changed level to" << CStatusMessage::severityToString(severity);
|
qtout << "Changed level to " << CStatusMessage::severityToString(severity) << endl;
|
||||||
}
|
}
|
||||||
else if (line.startsWith("log"))
|
else if (line.startsWith("log"))
|
||||||
{
|
{
|
||||||
@@ -146,6 +146,7 @@ namespace BlackMiscTest
|
|||||||
}
|
}
|
||||||
else if (line.startsWith("."))
|
else if (line.startsWith("."))
|
||||||
{
|
{
|
||||||
|
// handle dot commands
|
||||||
bool c = runtime->parseCommandLine(line);
|
bool c = runtime->parseCommandLine(line);
|
||||||
if (c) { qtout << "Handled command " << line; }
|
if (c) { qtout << "Handled command " << line; }
|
||||||
else { qtout << "Not handled " << line; }
|
else { qtout << "Not handled " << line; }
|
||||||
|
|||||||
Reference in New Issue
Block a user