logging cleanup part 4

Fixes #348