HACKER Q&A
📣 artembugara

Best Practices on Logging?


We build our first end-to-end solution (https://newscatcherapi.com/).

First time to implement logging.

We do not have the problems with how (technically) to log. The problem is logical - what to log.

Any general recommendations here, or it is purely case-specific?


  👤 verdverm Accepted Answer ✓
Super depends on your setup and how mature of a dev organization you are. One can get pretty sophisticated but the more you log the more it costs so there is a trade-off (I'm sure you are aware)

Generally people, get their logs in one place, realize they are missing something, add it it, realize it's noisy or expensive, turn some things off. It's generally iterative and what you need for your dev/biz ops / customer support. You'll find more challenging questions about who / when can access logs than deciding what to log. Do make sure to get audit logs sooner than later, though your cloud provider (we use GCP primarily) may be doing this for part of your infra

Checkout Google's SRE book, there are a few relevant essays, especially as you look to alert on log events.