I am in the process of selecting a logging system for our software development. We are using Boost extensively so the obvious option is boost.log V2
but before I select it to be used in my team, I have some questions that I could not find the answer in the documentation:
1- Can I remove the effect of it completely from the generated code? For example assume that I have this code and I need it to be in this way for debugging:
int main()
{
for( int i=0;i<100;i++)
{
int j=doSomething(i);
BOOST_LOG_TRIVIAL(trace) << << "I=2<<i <<" j="<<j;
}
}
is there any way that I remove the effect of logging system in above code so I am not loosing any performance as the result of using it?
2- Can I add section to the logging at the same time that I am adding severity? My code has several sections and we are working on a section at any time. I want to be able to set the logging to log the data for a specific section and not for the whole application which may have several section and possibly hundred of logging entry which needs to be filtered based on the part that I am working on it.
3- possibility of sending different logging to different sinks so for example some logging goes to console and some other goes to a file?