Hacker News new | ask | show | jobs
by chamomeal 512 days ago
Ok genuine question, since I feel like I’m using logs wrong:

How much stuff do you log in the server? I’ve only ever seen devs log basic high-level stuff. But to actually debug something, you need way more information.

I’ve tried sticking debug-level logs that log all sorts of business logic. Pretty much recreating what you would do with console.log when trying to isolate an issue locally.

But then you have your code permanently littered with debug log lines! It makes things… ugly!!

If you NEED detailed logging, do you just deal with the uglified code? Or is there a better solution? Decorators that logs parameters and such automatically??