Merge pull request #39038 from alexei38/plugin_partial
Adds PartialLogMetadata to encode protobuf for logger plugins
This commit is contained in:
commit
0c17c01526
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…
Reference in a new issue