A few logging improvements

This makes some headway on #3309, see commits for details.