WSGI logging middleware