Utility function for logging an event (e.g. for metric analysis).

    If no logger is given, fallback to the root logger.

def log_event(event, logger=root_logger, **log_dict):
    """
    Utility function for logging an event (e.g. for metric analysis).

    If no logger is given, fallback to the root logger.

    """
    msg = "event={}".format(event)
    msg = add_items_to_message(msg, log_dict)
    log_dict.update({'event': event})
    logger.info(msg, extra=log_dict)