1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Adds PartialLogMetadata to encode protobuf for logger plugins

Signed-off-by: Alexei Margasov <alexei38@yandex.ru>
This commit is contained in:
Alexei Margasov 2019-04-09 16:11:06 +05:00
parent 9d850cbfa5
commit 4a9836a20b

View file

@ -39,6 +39,13 @@ func (a *pluginAdapter) Log(msg *Message) error {
a.buf.TimeNano = msg.Timestamp.UnixNano()
a.buf.Partial = msg.PLogMetaData != nil
a.buf.Source = msg.Source
if msg.PLogMetaData != nil {
a.buf.PartialLogMetadata = &logdriver.PartialLogEntryMetadata{
Id: msg.PLogMetaData.ID,
Last: msg.PLogMetaData.Last,
Ordinal: int32(msg.PLogMetaData.Ordinal),
}
}
err := a.enc.Encode(&a.buf)
a.buf.Reset()