Fix an issue where debug logging never occurred because it was guarded incorrectly using isWarnEnabled(). Fixes gh-1780