Improve test coverage for StreamToLogger.