Are any C++ logging libraries safe to use within fork'ed/exec'ed processes?

2018-01-07 14:02:43

boost logging explicitly says it is not.

easylogging++ looks like it sets up extern'ed static state that might be trouble after a fork.

Requirements: log rolling after a certain size, support of logging levels, thread-safe.

I'd be happy with something that even needed to be reinitialized after forking.

I was successfully using spdlog in such scenario. Just initialize logger after calling fork.

https://github.com/gabime/spdlog

  • I was successfully using spdlog in such scenario. Just initialize logger after calling fork.

    https://github.com/gabime/spdlog

    2018-01-07 16:10:40