daemon/logger/local: fix appending newlines

The json-file driver appends a newline character to log messages with
PLogMetaData.Last set, but the local driver did not. Alter the behavior
of the local driver to match that of the json-file driver.

Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Cory Snider 2022-03-02 17:36:00 -05:00
parent 3844d1a3d1
commit 990b0e28ba
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ func (d *decoder) decodeLogEntry() (*logger.Message, error) {
}
msg := protoToMessage(d.proto)
if msg.PLogMetaData == nil {
if msg.PLogMetaData == nil || msg.PLogMetaData.Last {
msg.Line = append(msg.Line, '\n')
}