diff --git a/consumer/influx_stat.go b/consumer/influx_stat.go index 7a16412..47d5660 100644 --- a/consumer/influx_stat.go +++ b/consumer/influx_stat.go @@ -46,7 +46,6 @@ func (m *influxMetric) StartLogging() { defer func() { if err := recover(); err != nil { - influxLogger.Errorf("ERR:%s", debug.Stack()) m.handler.NotifyError(err.(error)) } }() @@ -83,7 +82,7 @@ func (m *influxMetric) StartLogging() { panic(err) } ticker := time.Tick(time.Second) - pointList := make([]*client.Point, 0) + pointList := make([]*client.Point, 0, 0) for { pointList = pointList[:cap(pointList)] @@ -113,7 +112,7 @@ func (m *influxMetric) StartLogging() { if err := influxDbConn.Write(batchPoint); err != nil { influxLogger.Warn(err) } - pointList = pointList[:0] + pointList = make([]*client.Point, 0, 0) } }