def log_listener(log:logging.Logger=None, level=logging.INFO):
if log is None:<EOL><INDENT>log = logging.getLogger("<STR_LIT>")<EOL><DEDENT>def listen(monitor):<EOL><INDENT>name = "<STR_LIT>".format(monitor.name) if monitor.name is not None else "<STR_LIT>"<EOL>perc = int(monitor.progress * <NUM_LIT:100>)<EOL>msg = "<STR_LIT>".format(**locals())<EOL>log.log(level, msg)<EOL><DEDENT>return listen<EOL>
Progress Monitor listener that logs all updates to the given logger