mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-12-20 07:00:10 +01:00
cli/logger: flush stdout after logging
This commit is contained in:
parent
fe686486ac
commit
1c527b30fe
1 changed files with 1 additions and 0 deletions
|
|
@ -134,6 +134,7 @@ void CLoggerImpl::log(eLogLevel level, const std::string_view& msg, const std::s
|
||||||
if (m_stdoutEnabled) {
|
if (m_stdoutEnabled) {
|
||||||
try {
|
try {
|
||||||
std::println("{}{}", m_colorEnabled ? logPrefixColor : logPrefix, logMsg);
|
std::println("{}{}", m_colorEnabled ? logPrefixColor : logPrefix, logMsg);
|
||||||
|
std::fflush(stdout);
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
; // this could be e.g. stdout closed
|
; // this could be e.g. stdout closed
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue