You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to initialize loggers implicitly (basically, one for each of our internal libraries, so we get one distinct "channel" for each lib).
Is it safe to call factories such as spdlog::stdout_color_mt() during static initialization? Or would it be subject to problems (such as static init order fiasco)?
The text was updated successfully, but these errors were encountered:
There is no problem with generation by static variables.
However, you may encounter problems when calling the logger in destructor.
See #1738 and #2113
And on Windows, spdlog::shutdown() must be called before the application exits (at the end of main()).
If you do not call it, the logger flush operation will not be performed and the writing of log messages from memory to file may not be completed.
We would like to initialize loggers implicitly (basically, one for each of our internal libraries, so we get one distinct "channel" for each lib).
Is it safe to call factories such as
spdlog::stdout_color_mt()
during static initialization? Or would it be subject to problems (such as static init order fiasco)?The text was updated successfully, but these errors were encountered: