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.
@@ -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')
}
