Issue with log from different thread #3605
Replies: 4 comments 2 replies
-
|
Since
Unless you have called |
Beta Was this translation helpful? Give feedback.
-
|
Two separate issues. Missing file messages - flush timing. spdlog::shutdown(); // flushes all loggers and stops the background flush threadFor errors you want on disk immediately:
|
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the reply, I double checked again and FooLog::init is called at the beginning of main before any thread starts ` ` I tried using both default and getting/setting logger via name but some error messages from lambda functions running in a qt slot are logged to std::out with old default logger in both cases |
Beta Was this translation helpful? Give feedback.
-
|
It turned out that the issue was related to my project structure. There was an internal library which was not correctly updated during build so wiping and recreating workspace fixed the issue. Thank you for the support and suggestions @tt4g @gistrec |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using this class as a wrapper around spdlog since I'm trying to replace the previous logging library
After using FooLog::init(...) I use FooLog::info() << "message"; to log inside the code
However not all expected messages are logged inside the file moreover from the console I can see messages with different pattern like
Those messages seems to come from threads different from the main thread.
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions