import logging logging.basicConfig(level=logging.WARNING) logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) logger.debug("some debugging...") logger.error("some error...")
logging.basicConfig(filename='example.log', filemode='w', level=logging.DEBUG)
!python -m unittest test_volume_cuboid.py