
Ask HN: Best Practices on Logging? - artembugara
We build our first end-to-end solution (https:&#x2F;&#x2F;newscatcherapi.com&#x2F;).<p>First time to implement logging.<p>We do not have the problems with how (technically) to log. The problem is logical - what to log.<p>Any general recommendations here, or it is purely case-specific?
======
verdverm
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.

