From a9421a9cd3539a6197d060eb1ad8d79b29d946a6 Mon Sep 17 00:00:00 2001 From: Chris Simons Date: Mon, 11 May 2020 20:36:51 -0700 Subject: [PATCH] Change log level on several status messages (Fixes #652, Fixes #516) This changes the log level for several statuses (started server, connected to server, server status:) from CLOG_NOTE or CLOG_INFO to CLOG_PRINT so they will be printed to stdout regardless of the log level. This allows the GUI to accurately report the status of the `barriers` or `barrierc` processes in src/gui/src/MainWindow.cpp#L379-L399. --- src/lib/barrier/ClientApp.cpp | 2 +- src/lib/barrier/ServerApp.cpp | 2 +- src/lib/barrier/win32/DaemonApp.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/barrier/ClientApp.cpp b/src/lib/barrier/ClientApp.cpp index a91312d8..9caf8fe4 100644 --- a/src/lib/barrier/ClientApp.cpp +++ b/src/lib/barrier/ClientApp.cpp @@ -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(); } diff --git a/src/lib/barrier/ServerApp.cpp b/src/lib/barrier/ServerApp.cpp index c1cb962d..13414fc7 100644 --- a/src/lib/barrier/ServerApp.cpp +++ b/src/lib/barrier/ServerApp.cpp @@ -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; } diff --git a/src/lib/barrier/win32/DaemonApp.cpp b/src/lib/barrier/win32/DaemonApp.cpp index eafd8936..382a679d 100644 --- a/src/lib/barrier/win32/DaemonApp.cpp +++ b/src/lib/barrier/win32/DaemonApp.cpp @@ -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;