Merge "Modify the logging guards for platform builds." into main