Extracting logging clauses to a separate method