Logs are for later

A log line is not written for the person who wrote it today. It is written for whoever is debugging at 3am, six months from now, with no memory of this code.

Log the inputs, not the outcome

"Done" tells you nothing when it fails. Log the inputs that produced the decision, so the next reader can see why the code chose what it chose, not just that it finished.

One event per line

Keep one event per line. Grep only works if each line stands on its own. A line that mixes two events breaks the search for both.

Levels are a promise

A log level is a promise about who reads it. Error means someone gets paged. Info means someone might scroll past it. Break that promise and nobody trusts the levels again.

Deleting a log is work too

Deleting a noisy log is as valuable as adding a useful one. A line nobody reads just hides the lines that matter.