func logEvent(cat cat.Cat, title string, name string, data map[string]string) {
	event := cat.NewEvent(title, name)
	if data != nil {
		for k, v := range data {
			event.AddData(k, v)
		}
	}
	event.SetStatus("0")
	event.Complete()
}
Example #2
0
func LogErrorEvent(cat cat.Cat, name string, err string) {
	event := cat.NewEvent("Error", name)
	event.AddData("detail", err)
	event.SetStatus("ERROR")
	event.Complete()
}