move logger into middleware
add provides middleware