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:
parent
9d850cbfa5
commit
4a9836a20b
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