def _add_urbansim_handler(handler, level=None, fmt=None, datefmt=None,
                          propagate=None):
    if not fmt:
        fmt = US_LOG_FMT
    if not datefmt:
        datefmt = US_LOG_DATE_FMT

    handler.setFormatter(logging.Formatter(fmt=fmt, datefmt=datefmt))

    if level is not None:
        handler.setLevel(level)

    logger = logging.getLogger('urbansim')
    logger.addHandler(handler)

    if propagate is not None:
        logger.propagate = propagate
Add a logging handler to urbansim.
dataset/ETHPy150Open UDST/urbansim/urbansim/utils/logutil.py/_add_urbansim_handler