refactor optimizer logs