title: How do I write a logging middleware for pyramid/pylons 2?
body: <p>I want to use either mongodb or redis to keep logs for users in pyramid/pylons, but cant find the doc on creating a middeware.  How do I go about it?</p>