mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-12-20 01:10:19 +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) {
|
||||
try {
|
||||
std::println("{}{}", m_colorEnabled ? logPrefixColor : logPrefix, logMsg);
|
||||
std::fflush(stdout);
|
||||
} catch (std::exception& e) {
|
||||
; // this could be e.g. stdout closed
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue