
Sean Hunt <rideau3 <at> gmail.com> writes:
I want to log to a file, with three levels of logging. So I might want to do the following (just an example! Not trying to mandate an interface or anything):
#include <boost/log.hpp>
using namespace boost; using namespace boost::log;
log<to_file<some_template_tricks>> my_log(warning);
Why would you want compile time configuration? I agree with one of the reviewers: in majority of the cases the only things that needs to be defined at compile time is message/entry type and filter type. How is it better than : regular_log my_log( "thresholdlevel=warning;file=abc.txt" ); One thing that might be defined at compile time is level: log_with_tag<level> my_log( "thresholdlevel=warning;file=abc.txt" ); In general logging should'n use compile time sparcely and prefer interfaces. The only preformance critical part is filterring. Formatting and destination optimization are pointless IMO. Gennadiy