Boost C++ Libraries

PrevUpHomeNext

Does Boost.Log support logging at process initialization and termination?

It should be fine to use logging during the application initialization (i.e. before main() starts). But there are a number of known problems with Boost.Log that prevent it from being used at process termination (i.e. after the main() function returns), so the official answer to the second part is no. It may work though, in some very restricted setups, if several rules are followed:

These rules don't guarantee that the library will work in termination context but they may help to avoid problems. The library will get improved to support this use case better.


PrevUpHomeNext