add pub sub logging#70
Conversation
|
I agree with what you've said, except for the wsgi logging piece. WSGI also receives messages that need to be parsed and it could be neat to provide a flag for printing those values out too. Specifically, that extra logging could be put somewhere near here: https://github.com/j2labs/brubeck/blob/master/brubeck/connections.py#L238 - rather than use ZMQ, which makes no sense, as you've described, I like the idea of perhaps just writing to whatever the logging mechanism in the system is. If there's a ZMQ logger, that could be used. If it's python's built in logger, that could be used. If it's an external service of some sort, that could be used. Do you have thoughts, concerns on this idea? I'm thinking out loud on this one. |
|
Would it be advisable to simply add 2 keyword arguments to Connection objects with default values of wherein The other logger would be: This way you could use either or both in either Classes. |
|
Hmm... Let me think on this one a little longer. |
within the app I would pass the
loggerobject, which is simply a zeromq PUB socket.m2reader.pylooks like this:Considering that a WSGI server wouldn't normally have a need to run zeromq, I don't know how you would want to handle logging with
WSGIConnection.