code: func (l *Logger) logTask(task Task) {
  	defer l.wg.Done()
  
  	logAll := !task.Throttled()
  	var last time.Time
  
  	var update *Update
  	for update = range task.Updates() {
  		if !tty(os.Stdout) && !l.forceProgress {
  			continue
  		}
  		if logAll || l.throttle == 0 || !update.Throttled(last.Add(l.throttle)) {
  			l.logLine(update.S)
  			last = update.At
  		}
  	}
  
  	if update != nil {
  		// If a task sent no updates, the last recorded update will be
  		// nil. Given this, only log a message when there was at least
  		// (1) update.
  		l.log(fmt.Sprintf("%s, done\n", update.S))
  	}
  
  	if v, ok := task.(interface {
  		// OnComplete is called after the Task "task" is closed, but
  		// before new tasks are accepted.
  		OnComplete()
  	}); ok {
  		// If the Task implements this interface, call it and block
  		// before accepting new tasks.
  		v.OnComplete()
  	}
  }
docs: // logTask logs the set of updates from a given task to the sink, then logs a
  // "done" message, and then marks the task as done.
  //
  // By default, the *Logger throttles log entry updates to once per the duration
  // of time specified by `l.throttle time.Duration`.
  //
  // If the duration if 0, or the task is "durable" (by implementing
  // github.com/git-lfs/git-lfs/tasklog#DurableTask), then all entries will be
  // logged.