RFC: Logging
There are several places where a component can be configured with a "debug" or "verbose" flag.
I believe the proposed solution is to use spdlog for this, for which there are two stages:
- Compile against spdlog
- Decide how to use it from our code
For 1, I think the simplest is to just copy the current version into libUtil.
For 2, this involves adding something like the following to the top of each file (or class?):
auto our_log = make_logger("logger_name");
I've implemented some of this in the ~devel_spd_log branch. Currently it only touches the verbose flag from Fei4Cmd.
In the initial version, I've added a logger configuration file to scanConsole, so adding "-l logging.json" pointing to a file with:
{ "pattern": "[%n] %v", "log_config": [ {"name": "fei4_cmd", "level": "trace"} ] }
prints something for every command sent.