Tweak logging helpers to make scanning voluminous output more efficient.

(Trivial patch, this stuff always seems to get lost.)