add logger middleware