Determine whether a Boost.Log sink exists

430 Views Asked by At

In my project I open a boost::log xml sink in a library and in the main application with different file names. The library launches its own log because it sometimes runs standalone. So, as expected, the main application log receives every log message and the library only those after it was created. I'd like to avoid this duplicative log by something like boost::log::sink::exists( type/filter/format ), any suggestions or is there a way to list open sinks? Right now I'm just checking for the existence of the main application log file, it works but is brittle.

Thanks

0

There are 0 best solutions below