Ignore context cancelled error in docker_log (#6221)
This commit is contained in:
parent
a3a6752f04
commit
f88004c62b
|
@ -227,7 +227,7 @@ func (d *DockerLogs) Gather(acc telegraf.Accumulator) error {
|
||||||
defer d.removeFromContainerList(container.ID)
|
defer d.removeFromContainerList(container.ID)
|
||||||
|
|
||||||
err = d.tailContainerLogs(ctx, acc, container, containerName)
|
err = d.tailContainerLogs(ctx, acc, container, containerName)
|
||||||
if err != nil {
|
if err != nil && err != context.Canceled {
|
||||||
acc.AddError(err)
|
acc.AddError(err)
|
||||||
}
|
}
|
||||||
}(container)
|
}(container)
|
||||||
|
|
Loading…
Reference in New Issue