TESTS: Add tests for logger_middleware. Allow the logger middleware to have a customizable Logger.