Tl;dr: my recommendation is to have our own interface with logging levels that the services pass complete messages.
I spent the evening reading up on:
- Java logging design
- C++ logging systems: log4cplusplus, log4cxx, glog, boost log, pantheons, and a few others
- how Stan’s services would use logging
I think all the packages are aligned on logging levels. I think we stick to those levels for now.
Where the C++ libraries differed was down to implementation. Some had function calls to log, others allowed you to stream into it. Some had pattern substitution, most didn’t.
I’m also thinking about @bgoodri’s use case of filtering based on messages. This seems to be calling out for having a secondary way of filtering the messages. In the Java logging utility, there is a name option that has a hierarchy. I think having a name is a decent way to handle that case.
I think if we ever want to move towards multitthreading, we want to keep the messages whole.
So my suggestion is to have our custom API for logging which includes a log level, name, and message. Thoughts?
(Sorry, won’t be at the meeting tomorrow.)