Skip to content

fix: flush spdlog messages also when logging to stderr - #142

Merged
dfaure-kdab merged 1 commit into
KDAB:mainfrom
smnppKDAB:sperret-flush_on
Aug 7, 2024
Merged

dfaure-kdab merged 1 commit into
KDAB:mainfrom
smnppKDAB:sperret-flush_on

Conversation

@smnppKDAB

@smnppKDAB smnppKDAB commented Aug 7, 2024

Copy link
Copy Markdown
Contributor

The existing code was only enabling flush when logs are redirected to files.
Without this, the relative order of the debug output from qWarnings() and from Message.log() wasn't preserved, making debugging difficult.

Comment thread src/core/knutcore.cpp
@smnppKDAB
smnppKDAB force-pushed the sperret-flush_on branch 2 times, most recently from e9a098f to 38dbd4d Compare August 7, 2024 10:51
@smnppKDAB
smnppKDAB requested a review from dfaure-kdab August 7, 2024 10:51
The existing code was only enabling flush when logs are redirected to files.
Without this, the relative order of the debug output from qWarnings() and from Message.log() wasn't preserved, making debugging difficult.
@dfaure-kdab dfaure-kdab changed the title fix: moved the call to spdlog::flush_on(spdlog::level::info) fix: flush spdlog messages also when logging to stderr Aug 7, 2024
@dfaure-kdab
dfaure-kdab merged commit 3831bd6 into KDAB:main Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants