Disable logging messages in pure C++ code
To date, when running a pure C++ program, all logs are always written, without any nice formatting. This raises to issues:
- I want to be able to disable, e.g., debug logging. So far, I can do that by:
*bob::core::debug = bob::core::AutoOutputDevice("null");
but this looks quite ugly. A nicer version would be, e.g., to have a function like bob::core::debug->reset()
. Even better, we can have a macro that we set before importing bob::core that sets up the loggers such that some of them go to "null" and some of them log to std::out
and/or std::err
- I would like to have similar log messages as we get using the Python logging. At least, I'd like to have the logger type (debug, info, ...), the time stamp and the log message.
I will try to come up with something here...