Skip to content

Commit

Permalink
Honor debug:enable_stdout_logs on startup (#2197)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
scorpion-26 authored May 3, 2023
1 parent fd3e6a3 commit c3b9326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 2 additions & 0 deletions src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3b9326

Please sign in to comment.