|
From: Yuri T. <qar...@gm...> - 2008-03-05 22:41:37
|
Malthe, First, there are only two debug messages at the moment in subversion. But I also disagree with the principle. Code is never bug free. People always end up finding new bugs. Or ask for features. Or suggest optimizations. In fact, the more mature the project is, the more people use it, and the more bugs they report and the more suggestions they make. Which means that every now and then we have to go an debug the code. To paraphrase a well-known quotation, "a software project is never finished, only abandoned." Python-markdown has not been abandoned yet, therefore it is not finished. Some debug messages are very specific to a particular bug. Once the bug is fixed, they can be removed. Except that of course you are never 100% sure that the change you made fully fixes the bug. Sure it passes specific tests, but someone will come up with another test that will fail. (Or you will come up with one in the shower the next morning.) So, if the bug fix is tentative, it makes sense to leave the debug statements in, I think. It does make sense to clean those up eventually. Additionally, some debug messages come in handy for pretty much any debugging session. In those cases it makes sense to leave them around for longer. Tests are not a replacement for debug messages. A test suit helps you identify regressions, but it can't help you find what _causes_ them. > I think a good use for log statements is when rare or unexpected > events happen, or if the user of the package needs some information. That's why the debug messages are filtered out by default. You need to ask for them to see them. Default logging level is CRITICAL. - yuri -- http://sputnik.freewisdom.org/ |