From 7331519b516b433074fd62b3fb074261d79c5f73 Mon Sep 17 00:00:00 2001 From: Chris Simons Date: Fri, 5 Jun 2020 16:23:45 -0700 Subject: [PATCH] add comments explaining the use of CLOG_PRINT --- src/lib/barrier/ClientApp.cpp | 2 ++ src/lib/barrier/ServerApp.cpp | 3 +++ src/lib/barrier/win32/DaemonApp.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/src/lib/barrier/ClientApp.cpp b/src/lib/barrier/ClientApp.cpp index 9caf8fe4..b1a7661e 100644 --- a/src/lib/barrier/ClientApp.cpp +++ b/src/lib/barrier/ClientApp.cpp @@ -282,6 +282,8 @@ ClientApp::scheduleClientRestart(double retryTime) void ClientApp::handleClientConnected(const Event&, void*) { + // using CLOG_PRINT here allows the GUI to see that the client is connected + // regardless of which log level is set LOG((CLOG_PRINT "connected to server")); resetRestartTimeout(); updateStatus(); diff --git a/src/lib/barrier/ServerApp.cpp b/src/lib/barrier/ServerApp.cpp index a772cad2..18cf9358 100644 --- a/src/lib/barrier/ServerApp.cpp +++ b/src/lib/barrier/ServerApp.cpp @@ -555,6 +555,9 @@ ServerApp::startServer() m_server->setListener(listener); m_listener = listener; updateStatus(); + + // using CLOG_PRINT here allows the GUI to see that the server is started + // regardless of which log level is set 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 382a679d..482c4652 100644 --- a/src/lib/barrier/win32/DaemonApp.cpp +++ b/src/lib/barrier/win32/DaemonApp.cpp @@ -353,6 +353,9 @@ 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"; + + // using CLOG_PRINT here allows the GUI to see that the server status + // regardless of which log level is set LOG((CLOG_PRINT "server status: %s", serverstatus)); m_ipcLogOutputter->notifyBuffer();