Configure logging behvior for the simulations.

def configure_logger(logger, filename, folder, log_level):
    '''Configure logging behvior for the simulations.
    '''
    fmt = logging.Formatter('%(asctime)s %(levelname)s: %(message)s')
    if folder is not None:
        log_file = os.path.join(folder, filename)
        hdl = logging.FileHandler(log_file)
        hdl.setFormatter(fmt)
        hdl.setLevel(log_level)
        logger.addHandler(hdl)
    shdl = logging.StreamHandler()
    shdl.setLevel(log_level)
    shdl.setFormatter(fmt)
    logger.addHandler(shdl)
    logger.setLevel(log_level)