mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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:
parent
3844d1a3d1
commit
990b0e28ba
1 changed files with 1 additions and 1 deletions
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue