A friend, who is learning python, asked me about how he might generate a cross-tab-like view of some data he was working on. A straight forward problem that presented a nice opportunity to demonstrate a couple of python's language features to reduce the number of lines of code as well as to make it more readable.
The only "problem" with python's logging module is that it is so configurable and has so many features that it is easy to lose sight of the forest for the trees. This is my standard method and opinion of how to best work with it. No detailed explanations forthcoming. All the "stab yourself in the eye with a fork" details and alternatives are available in the python docs.
This is just a note on freshening up
homebrew if an install doesn't work.