Ejemplo n.º 1
0
func (this *StandardSinkFormatter) GetFormattedMessage(msg core.LogMessage) string {
	var b bytes.Buffer
	this.compiledTemplate.Execute(
		&b,
		map[string]interface{}{
			"time":     msg.Time().Format(this.timeFormat),
			"severity": msg.Severity(),
			"message":  strings.Replace(msg.Message(), "\n", "\n\t", -1),
			"tags":     strings.Join(msg.Tags(), ","),
		},
	)
	return b.String()
}