provide logger as second argument to middleware