log based on events