Backport swift logging fixes