1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Logentries line-only logopt fix to maintain backwards compatibility

Changed logic to ignore empty value

Fixes #35626

Signed-off-by: Igor Karpovich <igor@karpovich.me>
This commit is contained in:
Igor Karpovich 2017-11-30 13:03:16 +00:00
parent 9ae697167c
commit 27a5b878c1

View file

@ -50,8 +50,10 @@ func New(info logger.Info) (logger.Logger, error) {
return nil, errors.Wrap(err, "error connecting to logentries")
}
var lineOnly bool
if lineOnly, err = strconv.ParseBool(info.Config[lineonly]); err != nil {
return nil, errors.Wrap(err, "error parsing lineonly option")
if info.Config[lineonly] != "" {
if lineOnly, err = strconv.ParseBool(info.Config[lineonly]); err != nil {
return nil, errors.Wrap(err, "error parsing lineonly option")
}
}
return &logentries{
containerID: info.ContainerID,