refactor log format, make sure events order