foxsi / foxsi-4matter

Code for FOXSI-4 formatter.
https://foxsi.umn.edu/
1 stars 3 forks source link

Migrate ListenerLogger-equivalent to this repository. #43

Open thanasipantazides opened 1 year ago

thanasipantazides commented 1 year ago

The plan

ListenerLogger is a little stale. The logging philosophy has changed since that was written, and now we want a log file for each data type for each system. E.g. we should have a specific log file for CdTe 1 event data, a specific file for CdTe 1 housekeeping data, a specific file for CMOS 2 quicklook data, etc. This is straightforward to implement when we receive UDP packets—check the header data for the system and data type. We can switch/case over each and choose the write log file. All that could be done in the original repository.

But, it would be easier at this point to leverage the LineInterface functionality here to infer all this stuff from systems.json and instantiate a logger. I suggest these commands to start with:

--verbose,    -v (to turn on verbose mode)
--help,       -h (to get help message and quit)
--use-spdlog, -s (to use spdlog-style logging, with ASCII-encoded hex rather than raw binary)
--config         (to pass in systems.json for setup)
--systems        (to select which systems to log data for)

What to add: