Skip to content

Commit

Permalink
Add stream label to docker driver
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena committed Sep 5, 2019
1 parent 6b51805 commit 497cff7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/docker-driver/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ func (l *loki) Log(m *logger.Message) error {
level.Info(l.logger).Log("msg", "ignoring empty line", "line", string(m.Line))
return nil
}
return l.handler.Handle(l.labels.Clone(), m.Timestamp, string(m.Line))
lbs := l.labels.Clone()
if m.Source != "" {
lbs["source"] = model.LabelValue(m.Source)
}
return l.handler.Handle(lbs, m.Timestamp, string(m.Line))
}

// Log implements `logger.Logger`
Expand Down

0 comments on commit 497cff7

Please sign in to comment.