Closed as not planned
Description
Testing #22291
class TestLogger(unittest.TestCase):
def test_logging(self):
logger = logging.getLogger(__name__)
#logger.setLevel(logging.DEBUG) # Set the desired log level
logger.setLevel(logging.INFO) # Set the desired log level
logger.debug("This is a debug message in a unittest.")
logger.info("This is an info message in a unittest.")
logger.warning("This is a warning message in a unittest.")
logger.error("This is an error message in a unittest.")
logger.critical("This is a critical message in a unittest.")
# Printing to stdout and stderr
print("This is a stdout message.")
print("This is a stderr message.", file=sys.stderr)
Regardless of log level, logger.debug
and logger.info
never show up in the Python test log. Is that expected?