Weekly Padgett

No. 0391 min read

Logs are for the poor bastard awake at 3 a.m.

Tell me what failed, what might already have happened, and what I can safely do next. At 3 a.m., I do not want to go spelunking through your source code.

A person sits on a patchwork-covered bed holding continuous paper trailing from a printer beside a computer.
File photoDramatization. No logging was harmed.

If your error message[1]Ref. 1error message en.wikipedia.org only makes sense with the source code[2]Ref. 2source code en.wikipedia.org open, you have left the person awake at 3 a.m. some homework.

Here's an invented bad message:

ERROR process_item failed

I'd ask for something more like this in a review:

BLOCKED stage=publish item=example-17 reason=verification_timeout
Local output was replaced; public readback did not confirm it.
Check the configured public URL and deployment mapping before retrying.

I made that example up; it isn't a transcript from one of my systems. The local output changed, but we don't know the remote result yet. At least now somebody has something to check before repeating a write and hoping for the best. That's what I'd want if I were the poor bastard trying to get back to bed.

References

  1. error message en.wikipedia.org ↩
  2. source code en.wikipedia.org ↩
loggingoperationsdebuggingrunbooks

More on this beat