def METHOD_NAME(self):
    """logging test to file"""
    self._set_logging(True)
    # ignore Qiskit TextProgressBar that prints to stderr
    with contextlib.redirect_stderr(io.StringIO()):
        with self.assertLogs("qiskit", level="DEBUG") as qiskit_cm:
            with self.assertLogs("qiskit_nature", level="DEBUG") as nature_cm:
                TestLogging._run_test()
    # check that logging was handled
    records = qiskit_cm.records.copy()
    records.extend(nature_cm.records)
    self._validate_records(records)