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
This commit is contained in:
scorpion-26 2023-05-03 17:08:01 +02:00 committed by GitHub
parent fd3e6a3bfd
commit c3b9326ba1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -248,9 +248,6 @@ void CCompositor::initServer() {
wlr_multi_backend_add(m_sWLRBackend, m_sWLRHeadlessBackend); wlr_multi_backend_add(m_sWLRBackend, m_sWLRHeadlessBackend);
initManagers(STAGE_LATE); initManagers(STAGE_LATE);
Debug::log(LOG, "Disabling stdout logs! Check the log for further logs.");
Debug::disableStdout = true;
} }
void CCompositor::initAllSignals() { void CCompositor::initAllSignals() {

View file

@ -1507,6 +1507,8 @@ void CConfigManager::loadConfigLoadVars() {
} }
Debug::disableStdout = !configValues["debug:enable_stdout_logs"].intValue; 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) { for (auto& m : g_pCompositor->m_vMonitors) {
// mark blur dirty // mark blur dirty