Backlinks Graph
Backlinks

General Logging

  2026-02-14

  Edited: 2026-02-14

Logging is hard. Some tips on logging taken from

I know it says for Node.js but it is applicable elsewhere.

Just going to do a brief rundown

  1. log levels
  2. structured logging (like json)
  3. aggregate and centralize logs (more for web)
  4. logging performance (this can have an issue)
  5. log to stdout
  6. add timestamps and context (like req for express)
  7. add stack trace

For log levels, I like