845
submitted 3 months ago by BlueKey@fedia.io to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] dejected_warp_core@lemmy.world 5 points 3 months ago* (last edited 3 months ago)

Honestly, this is why I tell developers that work with/for me to build in logging, day one. Not only will you always have clarity in every environment, but you won't run into cases where adding logging later makes races/deadlocks "go away mysteriously." A lot of the time, attaching a debugger to stuff in production isn't going to fly, so "printf debugging" like this is truly your best bet.

To do this right, look into logging modules/libraries that support filtering, lazy evaluation, contexts, and JSON output for perfect SEIM compatibility (enterprise stuff like Splunk or ELK).

this post was submitted on 03 Sep 2024
845 points (100.0% liked)

Programmer Humor

32715 readers
592 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS