Merge pull request #196 from thaJeztah/18.09_backport_plugin_partial
[18.09 backport] Adds PartialLogMetadata to encode protobuf for logger plugins Upstream-commit: 10b63ee8ba1b51d4740f1bbb92be7bfe375d9ed3 Component: engine
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user