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