Test and fix for issue #143 - parse logging adds a StreamHandler before setup_capture()

More details listed in issue #143