add logging into view