Add a logging framework for command line output
Description
Like DUNE, we only use regular std::cout
or std::cerr
output to the command line. The amount of printed lines is generally controlled via the key output.verbose
. Higher verbosity causes more output, also for debugging purposes, but the output generally lacks annotations on the quality of the information, as well as proper formatting.
We could use a logging framework for formatting all output and qualitative signalling, including debug, info, warning, and error messages. A nice framework which also uses the beautiful fmt, library for Python-like string formatting, is spdlog. Its current version is 1.1.0, but APT on Ubuntu Bionic only supplies 0.16.3. Nonetheless, this version could be quite useful already. Another option is adding the code as Git Submodule
Proposal
- Introduce spdlog as dependency.
- Use spdlog for all output.
- optional: Include more recent version as submodule.
How to test the implementation?
Running DORiE works.