Use process-level mutex to avoid log races.