Avoid needless Type stringification when logging is disabled.

Since 4d6be05c28, we've been a tad wasteful in implicit searches.

This adds a by-name parameter to the local logging method to
avoid that.

Review by @paulp