Simplify the middleware interface api

The logger is no longer passed, since it can be obtained from the
context