def update(self, work_unit, attribute, value):
    """Receives updates from monitored WorkUnits.

    Given updates for monitored WorkUnits, this method transforms a WorkUnit
    update into a log message. It logs all calls to this method at DEBUG
    level, passing all arguments. It then logs formatted messages at INFO
    level recording the status of the WorkUnit being updated.

    Args:
      work_unit: The WorkUnit that was updated.
      attribute: The attribute who's value was updated.
      value: The new attribute value.
    """
    self.log_debug(
      'Received an update - WorkUnit: %s, Attr: %s, Value: %s' % (
        work_unit.name, attribute, value), work_unit.name)
    if work_unit.get_status() == enums.Status.RUNNING:
      running = enums.status_to_string(work_unit.get_status())
      self.log_info(
        '%s: %s - %s of %s' % (
          running, work_unit.name, work_unit.complete, work_unit.total),
        work_unit.name)
    else:
      status_string = enums.status_to_string(work_unit.get_status())
      self.log_info(
        '%s: %s' % (status_string, work_unit.name), work_unit.name)
dataset/ETHPy150Open google/anvil-build/anvil/build_logging.py/WorkUnitLogSource.update/original