Merge pull request #196 from thaJeztah/18.09_backport_plugin_partial
[18.09 backport] Adds PartialLogMetadata to encode protobuf for logger plugins
This commit is contained in:
commit
10b63ee8ba
1 changed files with 7 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue