Since boost::log does not work correctly with different formatters per sink, we need to inline the formatter into the sink we use for capturing bson logs in unit tests.
boost::log caaches the formatter information in a thread local. See https://github.com/mongodb/mongo/blob/0ef652f6456a46b6e162e147f75ab5cdd05018f5/src/third_party/boost-1.70.0/boost/log/sinks/basic_sink_frontend.hpp#L344-L345