DevPrep

All topics › Security

Logs and personal data: what must not be logged, and how?

Junior PRO

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

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store