code: func (h *TextHandler) Log(logger_name string, level LogLevel, msg string,
  	calldepth int) {
  	h.mtx.RLock()
  	output, template := h.output, h.template
  	h.mtx.RUnlock()
  	event := LogEvent{
  		LoggerName: logger_name,
  		Level:      level,
  		Message:    strings.TrimRight(msg, "\n\r"),
  		Timestamp:  time.Now()}
  	if calldepth >= 0 {
  		_, event.Filepath, event.Line, _ = runtime.Caller(calldepth + 1)
  	}
  	var buf bytes.Buffer
  	err := template.Execute(&buf, &event)
  	if err != nil {
  		output.Output(level, []byte(
  			fmt.Sprintf("log format template failed: %s", err)))
  		return
  	}
  	output.Output(level, buf.Bytes())
  }
docs: // Log makes a LogEvent, formats it with the configured template, then passes
  // the output to configured output sink