Menu

Before You Send Logs to Gemini — Strip the PII First
🖼️

Before You Send Logs to Gemini — Strip the PII First

DEV Community·hiyoyo·6 months ago
#3ZTzzadx
#ai#gemini#rust#line#regex
Reading 0:00
15s threshold

All tests run on an 8-year-old MacBook Air.

Android logs contain more than stack traces.

User IDs. Email addresses. IP addresses. Phone numbers. Auth tokens that slipped into a debug log. Device identifiers.

Before you send logcat output to any AI API — including Gemini — strip the sensitive data. Here's the filter I built into HiyokoLogcat.

What logcat actually leaks

Real examples from production apps I've debugged:

D/Network: Connecting to 192.168.1.105:8080 I/Auth: User token: eyJhbGciOiJIUzI1NiJ9... D/User: Loading profile for [email protected] I/Device: Serial: R58M123ABCD

Enter fullscreen mode

Exit fullscreen mode

None of this should go to an external API.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.