it does do the check. in the line below, he is doing string formatting before the call to debug, so presumably he was trying to save the computation time of doing that.

you can do this by using comma instead of %, as the log methods accepts *args and do formatting later for you: `log.debug("calling sendto(%r)", data)`

although there is still a few more calls that happen before it checks log level, so depending how often this i called, this check may be valid.