馃敡 add some protections on std::exit
- According to std::exit
documentation, thread_local will be freed before statics, there's a
small chance that a logger call is made whilst
LogFacility
is still alive but the mains_threadLocalInfo
has already been released. - adding an atomic counter to prevent that