Guides

Mask personal data and secrets in log files

Logs are the most useful thing to attach to a bug report and one of the riskiest. A few hundred lines from a web server or an app usually contain client IP addresses, email addresses, session tokens and sometimes a key someone logged by mistake.

What a log typically gives away

Keep it useful: stable pseudonyms

Deleting every value makes a log useless for debugging: you can no longer see that the same client made the three failing requests. Replace values with stable pseudonyms instead. In the Anonymizer, the Log file preset uses hashes: the same IP address becomes the same code, such as IP_7f3a01bc, on every line, and different addresses get different codes.

The log preset leaves name detection off, since capitalized words in logs are rarely names, and keeps everything with a fixed format on: IPs, MAC addresses, emails, URLs and host names, keys and passwords, card numbers and IBANs.

Step by step

  1. Open the anonymizer and choose Open file, or drop the log onto the text box. The file is read by your browser and never uploaded; files up to 5 MB fit.
  2. The Log file preset is picked for .log files. Check the findings and switch categories on or off.
  3. Add anything specific to your system to the custom terms list: customer names, project code names, internal domains.
  4. Download the result. It keeps the file name, with .anonymized before the extension.

Before you send