Logs and personal data: what must not be logged, and how?
Essence
Logs are for diagnostics, but you're far from their only reader. The device's system log is available through Console on a connected Mac and ends up in sysdiagnoses users attach to support requests; logs from third-party SDKs and crash reporters go to other people's servers. So nothing usable by an attacker, and nothing that reveals the user's identity, should end up in a log.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep