Hacker News new | ask | show | jobs
by macpete42 1646 days ago
Why would I verify logging which itself is a verification instrument? And, seriously, how hard is it to emit a diagnostic message so I need a test for that to get it right?
2 comments

If you have some rare (rare as in it happens once every few months or something like that) error and you need logging about it. Also testing it ensures nobody by mistake removes that bit of logging by accident.
code reviews would probably be a better fit to prevent that.
Code reviews are useful, but I've never seen them used as an argument against writing tests.
There are tests of tests, why wouldn't there exist techniques for the verification of logging?