Browse Source

Fix: it's a StreamingAcquisition error, not an ugly copy/paste error from OneShotAcquisition function.

Mathieu Lecarme 3 years ago
parent
commit
e76d58c77a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      pkg/acquisition/modules/loki/loki.go

+ 3 - 3
pkg/acquisition/modules/loki/loki.go

@@ -352,7 +352,7 @@ func (l *LokiSource) StreamingAcquisition(out chan types.Event, t *tomb.Tomb) er
 					return nil
 				}
 				if res == nil { // no body, it's a network error, not a HTTP error
-					return errors.Wrap(err, "loki OneShotAcquisition error before HTTP stack")
+					return errors.Wrap(err, "loki StreamingAcquisition error before HTTP stack")
 				}
 				buf, err2 := ioutil.ReadAll(res.Body)
 				if err2 == nil {
@@ -364,7 +364,7 @@ func (l *LokiSource) StreamingAcquisition(out chan types.Event, t *tomb.Tomb) er
 			defer c.Close()
 			_, reader, err := c.NextReader()
 			if err != nil {
-				return errors.Wrap(err, "loki OneShotAcquisition error while reading JSON websocket")
+				return errors.Wrap(err, "loki StreamingAcquisition error while reading JSON websocket")
 			}
 			var resp Tail
 			decoder := json.NewDecoder(reader)
@@ -377,7 +377,7 @@ func (l *LokiSource) StreamingAcquisition(out chan types.Event, t *tomb.Tomb) er
 					if err == io.EOF { // the websocket is closed
 						break
 					}
-					return errors.Wrap(err, "OneShotAcquisition error while parsing JSON websocket")
+					return errors.Wrap(err, "loki StreamingAcquisition error while parsing JSON websocket")
 				}
 				l.logger.WithField("type", t).WithField("message", resp).Debug("Message receveid")
 				l.readOneTail(resp, out)