Fix debug logging

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

Fixes gh-1780
Merge branch '1.1.x'