Skip to content

Commit

Permalink
Merge pull request #664 from simons-public/fix-gui-status
Browse files Browse the repository at this point in the history
Change log level on several status messages (Fixes #652, Fixes #516)
  • Loading branch information
shymega authored May 12, 2020
2 parents 5d82510 + 639415e commit dc2869f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/gui/src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ void MainWindow::logError()

void MainWindow::appendLogInfo(const QString& text)
{
m_pLogWindow->appendInfo(text);
if (appConfig().logLevel() >= 3) {
m_pLogWindow->appendInfo(text);
}
}

void MainWindow::appendLogDebug(const QString& text) {
Expand Down Expand Up @@ -536,10 +538,7 @@ void MainWindow::startBarrier()

qDebug() << args;

// show command if debug log level...
if (appConfig().logLevel() >= 4) {
appendLogInfo(QString("command: %1 %2").arg(app, args.join(" ")));
}
appendLogDebug(QString("command: %1 %2").arg(app, args.join(" ")));

appendLogInfo("config file: " + configFilename());
appendLogInfo("log level: " + appConfig().logLevelText());
Expand Down
2 changes: 1 addition & 1 deletion src/lib/barrier/ClientApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ ClientApp::scheduleClientRestart(double retryTime)
void
ClientApp::handleClientConnected(const Event&, void*)
{
LOG((CLOG_NOTE "connected to server"));
LOG((CLOG_PRINT "connected to server"));
resetRestartTimeout();
updateStatus();
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/barrier/ServerApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ ServerApp::startServer()
m_server->setListener(listener);
m_listener = listener;
updateStatus();
LOG((CLOG_NOTE "started server (%s), waiting for clients", family));
LOG((CLOG_PRINT "started server (%s), waiting for clients", family));
m_serverState = kStarted;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/barrier/win32/DaemonApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ DaemonApp::handleIpcMessage(const Event& e, void*)
LOG((CLOG_DEBUG "ipc hello, type=%s", type.c_str()));

const char * serverstatus = m_watchdog->isProcessActive() ? "active" : "not active";
LOG((CLOG_INFO "server status: %s", serverstatus));
LOG((CLOG_PRINT "server status: %s", serverstatus));

m_ipcLogOutputter->notifyBuffer();
break;
Expand Down

0 comments on commit dc2869f

Please sign in to comment.