def force_log_rollover(logger):
    """
    This will access the handler that is configured as a RotatingFileHandler and force a rollover.

    :param logger: logger that you are using to write logs
    :return boolean: True if successful else false
    """
    rolled_over = False

    for handle in logger.root.handlers:
        if handle.name == "logfile":
            handle.doRollover()
            rolled_over = True
            break

    return rolled_over