mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 20:51:58 -07:00
log: Add some colors to stdout log 🔴🟡🟢🔵🟣 (#5778)
* add colored log * add config option * make it dynamic
This commit is contained in:
@@ -377,6 +377,7 @@ CConfigManager::CConfigManager() {
|
||||
m_pConfig->addConfigValue("debug:error_limit", Hyprlang::INT{5});
|
||||
m_pConfig->addConfigValue("debug:watchdog_timeout", Hyprlang::INT{5});
|
||||
m_pConfig->addConfigValue("debug:disable_scale_checks", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("debug:colored_stdout_logs", Hyprlang::INT{1});
|
||||
|
||||
m_pConfig->addConfigValue("decoration:rounding", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("decoration:blur:enabled", Hyprlang::INT{1});
|
||||
@@ -592,7 +593,7 @@ CConfigManager::CConfigManager() {
|
||||
setDefaultAnimationVars();
|
||||
resetHLConfig();
|
||||
|
||||
Debug::log(LOG,
|
||||
Debug::log(INFO,
|
||||
"!!!!HEY YOU, YES YOU!!!!: further logs to stdout / logfile are disabled by default. BEFORE SENDING THIS LOG, ENABLE THEM. Use debug:disable_logs = false to do so: "
|
||||
"https://wiki.hyprland.org/Configuring/Variables/#debug");
|
||||
|
||||
@@ -818,6 +819,8 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
|
||||
if (Debug::disableStdout && isFirstLaunch)
|
||||
Debug::log(LOG, "Disabling stdout logs! Check the log for further logs.");
|
||||
|
||||
Debug::coloredLogs = reinterpret_cast<int64_t* const*>(m_pConfig->getConfigValuePtr("debug:colored_stdout_logs")->getDataStaticPtr());
|
||||
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
// mark blur dirty
|
||||
g_pHyprOpenGL->markBlurDirtyForMonitor(m.get());
|
||||
|
Reference in New Issue
Block a user