Closed kartikg3 closed 7 years ago
This way the output can be channeled to a file/different streams/sockets and all the other goodies Python logging provides. What are your thoughts on this?
I have not really thought it through. I don't really intend to leave those in there over the long run, they're useful while the API evolves but it's not something I think of as a feature -- most of the ones in there are only there because I forgot to take out debug code.
Another way to handle it would be to create a system using Events, which could fire messages as needed without knowing about the receiving end; then you could add handlers for that events that tied in to logging
or other structures of your own
Ooops, did not mean to close
Oh yes that is a great idea! Having a logging system in place that can be connected to events if needed to route info to log files, streams and what not.
This has been dormant for a long time.... I'm closing it since I haven't felt the need for it and the current code base contains basically no prints (there's one exception traceback print which should get changed to a cmds.error
and a warning message in the event __del__
which should become a real warning
Do you think we should replace all print statements of tracebacks and user feedback to use Python's logging API?