Logging
We need some interface for logging. This should be completely abstract in the user (and core) code to where the log messages log (local, over the network etc). The repo contains some example code already for a sender and receiver, ZMQ patterns are all wrong, but the idea is:
- User code logs something: `LOG(INFO) << "Value changed to: " << value;
- Locally, where user code runs terminal prints:
|12:26:34.635| (INFO) [R:MyUserModule] Value changed to: 15
- Remotely, on a log receiver, we get:
|12:26:34.635| (INFO) [R:MyUserModule] Value changed to: 15
But also:
- User code logs something: `LOG(DEBUG) << "This is just some debug output";
- Locally, where user code runs with
-v DEBUG
terminal prints:|12:26:34.635| (DEBUG) [R:MyUserModule] This is just some debug output
- Remotely, on a log receiver with "show
INFO
upwards", we get nothing
For basis of the logging library we could use
- The
log
class of APSQ which already has some nice features, and flange that onto ZMQ - The quite nicely looking
g3log
that provides a proper interface to register as many sinks (destinations) as we want, this is what's currently in the code: https://github.com/KjellKod/g3log