Skip to content
Log in

Logging Strategy

Decides what to log from the questions you will need to answer at 3am, rather than logging everything and finding nothing.

0

Share this prompt

Free — no card needed

Create a free account

to open Logging Strategy — and the other 364 prompts across 21 categories.

We store your email address to send these. We never sell it or pass it to advertisers. Withdraw at any time. Privacy Policy.

Already have an account?

CategoryCodingForDevelopers, OperatorsTested onClaudeChatGPT

Running it, start to finish

  1. Write down the questions an incident will need answered.
  2. Thread a request id through everything, including outbound calls.
  3. Check the design against a past incident before adopting it.

What you get back

The output this produces, every time.

  • Designs backwards from the questions an incident will ask, rather than forwards from what seems interesting.
  • Logs the inputs to a decision, not just its outcome, which is what makes a rejection diagnosable.
  • Tests the design against your actual incident history, which is the only real check.

Getting better results

Where this usually goes wrong, and how to avoid it.

  • Log events with fields, not sentences. A concatenated message cannot be filtered or aggregated, which is the whole difference between logs and useful logs.
  • Log the start of long operations. Logging only completion makes a hung operation invisible, which is precisely when you most need to see it.
  • Reserve error for things people act on. An error level nobody responds to trains everyone to ignore it, and then the real one is missed too.

More Coding prompts

All Coding

Written for The AI University. Every prompt in this library is original work — authored, tested and revised here, not collected from elsewhere. 365 of them, free with an account.