import logging level = logging.DEBUG logger = logging.getLogger() logger.setLevel(level) for handler in logger.handlers: handler.setLevel(level)