Provide utility context manager to intercept writes to stdout and stderr and convert them to logging records