Log Strategy and Retention Plan
Decide what to log, where, and for how long.
Added October 15, 2026. Written with AI assistance and checked for clarity and placeholders; not reviewed by a lawyer, accountant, clinician or other professional. How these prompts are made
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it (what [VERIFY] means).
Create a logging strategy. Applications and languages: [APPLICATIONS]. Log volume per day and current cost: [VOLUME_COST]. Compliance and privacy needs: [COMPLIANCE_PRIVACY]. How we search logs today: [SEARCH_PRACTICE]. Define a structured log format with required fields (timestamp, level, service, trace id, request id, user-safe identifiers), levels with rules for when to use each, and a list of data that must never be logged (passwords, tokens, full card numbers, sensitive personal data). Propose tiers of retention (hot, warm, archive) with durations that I confirm against legal requirements [VERIFY], and sampling rules for high-volume logs. Provide a migration plan for a service that logs unstructured text. Include a cost model with formulas using my volume and a placeholder unit price. Add an audit checklist for logging sensitive data and a script outline that scans recent logs for patterns of secrets. Add a short checklist for a code review of logging statements, a convention for including correlation IDs across services, and a sample of three good and three poor log lines with the fix for each. Explain how to test that sensitive fields are masked, using a CI check on sample payloads, and who approves exceptions to the never-log list.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.