Add logger to middleware