Add logging middleware

This currently just has dummy output