mardi 15 mai 2018

Check boost::log filter explicitly?

I have some trivial logging:

BOOST_LOG_TRIVIAL(trace) << make_trace_record();

Now make_trace_record is a somewhat expensive function to call (don't ask why, it's complicated). I want to call it only if the log currently passes filtering. How can I do that? I don't see a way to call the severity filter explicitly.

Aucun commentaire:

Enregistrer un commentaire