lock Data while iterating logs