Package gfit: Unify debug messages for easier reading.
authorFlorian Forster <ff@octo.it>
Sun, 28 Jan 2018 19:58:33 +0000 (20:58 +0100)
committerFlorian Forster <ff@octo.it>
Sun, 28 Jan 2018 19:58:33 +0000 (20:58 +0100)
gfit/gfit.go

index 657da7d..b6e9bc0 100644 (file)
@@ -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
        }
        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{
 
        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 {
        }
 
        if len(res.Point) == 0 {
+               log.Debugf(ctx, "read cumulative data %s until %v: []", dataSource.DataStreamId, endTime)
                return &fitness.Value{}, startTime, nil
        }
 
                return &fitness.Value{}, startTime, nil
        }