code: func (op *triageOp) appendToLog(c context.Context, msg string) {
  	const maxMessageCount = 1000
  
  	ms := clock.Now(c).Sub(op.started).Nanoseconds() / 1e6
  
  	op.debugLogLock.Lock()
  	if op.debugLogMsgs <= maxMessageCount {
  		if op.debugLogMsgs < maxMessageCount {
  			fmt.Fprintf(&op.debugLog, "[%03d ms] %s\n", ms, msg)
  		} else {
  			fmt.Fprintf(&op.debugLog, "<the log is too long, truncated here>")
  		}
  		op.debugLogMsgs++
  	}
  	op.debugLogLock.Unlock()
  }
docs: // appendToLog adds a line to the debug log, prefixing it with current time.