3 ms·
Is that really any different from any other type error you might miss? Just run your tests with logging in info mode.
by globular-toast 3y ago
Is that really any different from any other type error you might miss? Just run your tests with logging in info mode.
- dboreham 3y agoWhich misses the bug that only shows up when logging is at error or warn level.
- theamk 3y agologging's formatter ignores errors. It will complain on console, but no exception will be raised, so the tests would pass. Unless you open test logs and manually examine output (and who does this for passing tests?), the test results will show green.
- mixmastamyk 3y agoNot exactly, it does not ignore errors. First, an error doesn’t occur until a format op at/above level happens. Change to log.error() for example and watch the fireworks. Second, true it will continue on, but the error is well logged with a traceback. The thinking, I happen to agree with is that a logging error shouldn’t halt the program. A logging error doesn’t cause an error in the program itself. I could see an argument the other way in specific situations however. I’d probably subclass Logger instead if that is not configurable.
- msm_ 3y ago>Second, true it will continue on, but the error is well logged with a traceback. The thinking, I happen to agree with is that a logging error shouldn’t halt the program. And the parameters are also logged, so you don't really lose anything should this somehow happen in production.