code: func (ui *UI) DisplayLogMessage(message LogMessage, displayHeader bool) {
  	ui.terminalLock.Lock()
  	defer ui.terminalLock.Unlock()
  
  	var header string
  	if displayHeader {
  		time := message.Timestamp().In(ui.TimezoneLocation).Format(LogTimestampFormat)
  
  		header = fmt.Sprintf("%s [%s/%s] %s ",
  			time,
  			message.SourceType(),
  			message.SourceInstance(),
  			message.Type(),
  		)
  	}
  
  	for _, line := range strings.Split(message.Message(), "\n") {
  		logLine := fmt.Sprintf("%s%s", header, strings.TrimRight(line, "\r\n"))
  		if message.Type() == "ERR" {
  			logLine = ui.modifyColor(logLine, color.New(color.FgRed))
  		}
  		fmt.Fprintf(ui.Out, "   %s\n", logLine)
  	}
  }
docs: // DisplayLogMessage formats and outputs a given log message.