From: Florian Forster Date: Sun, 28 Jan 2018 19:58:33 +0000 (+0100) Subject: Package gfit: Unify debug messages for easier reading. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4c298110b1564f337cd0ceaad8e94fd4d4f7741f;p=kraftakt.git Package gfit: Unify debug messages for easier reading. --- diff --git a/gfit/gfit.go b/gfit/gfit.go index 657da7d..b6e9bc0 100644 --- a/gfit/gfit.go +++ b/gfit/gfit.go @@ -342,7 +342,7 @@ func (c *Client) updateCumulative(ctx context.Context, dataSource *fitness.DataS if now := time.Now().In(startOfDay.Location()); now.Before(endOfDay) { endTime = now } - log.Debugf(ctx, "adding cumulative data point: %v-%v %+v", startTime, endTime, diffValue) + log.Debugf(ctx, "add cumulative data %s until %v: %+v", dataSource.DataStreamId, endTime, diffValue) return c.DataSetPatch(ctx, dataSource.DataStreamId, []*fitness.DataPoint{ &fitness.DataPoint{ @@ -364,6 +364,7 @@ func (c *Client) readCumulative(ctx context.Context, dataSource *fitness.DataSou } if len(res.Point) == 0 { + log.Debugf(ctx, "read cumulative data %s until %v: []", dataSource.DataStreamId, endTime) return &fitness.Value{}, startTime, nil }