From c3b9326ba15e621324d098e8a6365efac914c7b4 Mon Sep 17 00:00:00 2001 From: scorpion-26 Date: Wed, 3 May 2023 17:08:01 +0200 Subject: [PATCH] Honor debug:enable_stdout_logs on startup (#2197) * Honor debug:enable_stdout_logs on startup disableStdout is set via config in CConfigManager::init(), which is called early in CCompositor::initServer(). initServer() always disables stdout logs at the end though, even when stdout is enabled is config. With this commit, the config is respected. * Don't spam stdout message --- src/Compositor.cpp | 3 --- src/config/ConfigManager.cpp | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 4e31b015..cd48fd83 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -248,9 +248,6 @@ void CCompositor::initServer() { wlr_multi_backend_add(m_sWLRBackend, m_sWLRHeadlessBackend); initManagers(STAGE_LATE); - - Debug::log(LOG, "Disabling stdout logs! Check the log for further logs."); - Debug::disableStdout = true; } void CCompositor::initAllSignals() { diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index a839925f..be457e66 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1507,6 +1507,8 @@ void CConfigManager::loadConfigLoadVars() { } Debug::disableStdout = !configValues["debug:enable_stdout_logs"].intValue; + if (Debug::disableStdout && isFirstLaunch) + Debug::log(LOG, "Disabling stdout logs! Check the log for further logs."); for (auto& m : g_pCompositor->m_vMonitors) { // mark blur dirty