News for hackers. Stuff that matters.
Re:Don't Look Down on Print Debugging by orwin on Saturday November 23, 2024 @10:44AM (#42221472)
Isn't it better to use a logger than print statements for distributed systems? Maybe I'm putting too much logging everywhere, but distributed systems are typically a use case where a bug can appear, be 'fixed' (or 'fix itselfn) , then re-appear two month later (the eisenbug). In this case, DEBUG=true and relaunching the app with a logger is often better imho (and if your logger is good, it prints on stdout/stderr when your app is launched locally).
Re:Don't Look Down on Print Debugging by baq on Saturday November 23, 2024 @12:52PM (#42222290)
Absolutely - if you want to make this distinction. I put logger.debug() and print() in the same bucket; if you're fancy, you've configured your print to emit logs or configured your linter to forbid print calls.