mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-17 00:42:11 +01:00
logs: disable stdout after init
This commit is contained in:
parent
a5a0434fff
commit
e73c6fd3b0
3 changed files with 9 additions and 3 deletions
|
@ -85,6 +85,10 @@ void CCompositor::setRandomSplash() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCompositor::initServer() {
|
void CCompositor::initServer() {
|
||||||
|
|
||||||
|
Debug::log(LOG, "Disabling stdout logs! Check the log for further logs.");
|
||||||
|
Debug::disableStdout = true;
|
||||||
|
|
||||||
m_sWLDisplay = wl_display_create();
|
m_sWLDisplay = wl_display_create();
|
||||||
|
|
||||||
m_sWLEventLoop = wl_display_get_event_loop(m_sWLDisplay);
|
m_sWLEventLoop = wl_display_get_event_loop(m_sWLDisplay);
|
||||||
|
|
|
@ -75,5 +75,6 @@ void Debug::log(LogLevel level, const char* fmt, ...) {
|
||||||
ofs.close();
|
ofs.close();
|
||||||
|
|
||||||
// log it to the stdout too.
|
// log it to the stdout too.
|
||||||
std::cout << output << "\n";
|
if (!disableStdout)
|
||||||
|
std::cout << output << "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ namespace Debug {
|
||||||
void wlrLog(wlr_log_importance level, const char* fmt, va_list args);
|
void wlrLog(wlr_log_importance level, const char* fmt, va_list args);
|
||||||
|
|
||||||
inline std::string logFile;
|
inline std::string logFile;
|
||||||
inline int64_t* disableLogs = nullptr;
|
inline int64_t* disableLogs = nullptr;
|
||||||
inline int64_t* disableTime = nullptr;
|
inline int64_t* disableTime = nullptr;
|
||||||
|
inline bool disableStdout = false;
|
||||||
};
|
};
|
Loading…
Add table
Reference in a new issue