NTSTATUS constants in winnt.h have incorrect type
A special macro or function seems like the right way to go. Terminating from within the library will not guarantee that all log records are processed. Also, calling core::flush() from an atexit handler won't work because the library is likely terminated at this stage.
It's not the logging library's job to terminate the application. If you want to terminate then go ahead and do that - in the application. You may want to call core::flush() to make sure all log records are processed.
What's wrong with BOOST_LOG_SEV(lg, fatal) << "Good bye cruel world"?
You need to build Boost with TSan as well. And using clang-14. Add -fsanitize=thread to cxxflags and linkflags and add toolset=clang-14 in b2 command line.
Did you build Boost with TSan? What compiler flags did you use? What exact source code, with everything irrelevant removed, reproduces it? Please post in another thread.
Did you build Boost with TSan? What compiler flags did you use? Please post in another thread.
I also had to change slg to severity_logger_mt. I cannot reproduce this on the current develop branch on my Ubuntu 22.04 and clang 14. Also, please don't post off-topic in this thread. This discussion is about __FILE__ and __LINE__ formatting.