add getLogger() in MiddlewareFactory and implement it in
RecMiddlewareFactory.