Logging That Helps When a Warehouse Script Fails at 6am

Published 2026-05-07 by Faraz Rahimi

Pretty logs for developers are useless at dawn. You need the input file name, the last successful key, and whether it is safe to rerun.

Logging That Helps When a Warehouse Script Fails at 6am

Tags: Python, Logging, Operations, Reliability, unlisted

When receiving calls because the import died, they do not care about a stack trace in a style you like. They care: did any rows write, which ones, and can we press the button again.

I log start, source hash, row counts, the last primary key committed, and a clear rerun: safe or not. I print that in the UI, not only in a file on my laptop.

Correlate with the physical world

A log line with a tracking number beats one with a UUID. Humans search Slack for the tracking number.

Keep logs where the operators are

A folder on a share, a table in Postgres, even an emailed summary. If logs require VPN and a tail command, you will be the pager forever.

Original post: https://farazrahimi.com/posts/logging-that-helps-when-a-warehouse-script-fails-at-6am