Logging touchups.

As requested by beav.

Replaces pull request #405