My thoughts:
- interface_callback::writer should stay separate from a logger. It's a really straightforward interface and works well in the context of messages and other output.
- I don't think we need to decide whether a logger wraps interface_callbacks::writer. If I were implementing a logger for an interface I might do it that way but at the stan-dev/services level I don't know what would work best. One thing we get by assuming that the logger wraps interface_callbacks::writer is that we automatically know what kind of output can get sent to the logger and that should simplify defining the interface consistently at the services level.
- If we do wrap interface_callbacks::writer then logger::level() could just do its bit (add timestamp/etc...) and pass the arguments on to a writer.
- I like the function call format (if we wrap writers in the logger) because it makes it clear how they are being called. I don't have a strong opinion on it.
- If we want to (and I think we do) abstract out the "files vs. terminals vs. elsewhere" issue I think we should stick with wrapping interface_callbacks_writer since that interface already lets us abstract out the issue.
At the c++/CmdStan level it's easy to imagine constructing a logger from the usual stuff---filenames/streams/etc... to echo Bob's question, what do the other interfaces need to be able to send output to?