logger_handler.setFormatter(logging.Formatter('%(message)s'))
logger.error('error message')
logger_handler.setFormatter(logging.Formatter(
    'PROCESSING FILE xxx - %(message)s'))
logger.error('error message')
How to change the format of logged messages temporarily, in Python?