Simple logging middleware.