top | item 34312558

(no title)

benjaminpv | 3 years ago

Something I haven't seen discussed very widely: it feels like there's not only a balance needed in determine what to log vs what not to log, but also logging in a way that isn't a detriment to the readability of the code overall.

Over time I've actually found myself logging less just because having to sorta mentally elide logging lines added to the cognitive overhead of reading & understanding code.

discuss

order

63|3 years ago

Depending on the language and framework you're using, there may be options for logging that's non-intrusive. For example, Spring Aspects and Python decorators. Clean logging is a very common problem that probably already has a lot of solutions if you go looking.