log code polishing