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

8 commits

Author SHA1 Message Date
Alexander Morozov
378f0657f9 daemon/logger: fix races in channel close
it's actually not okay to do such trick from multiple goroutines

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-06-27 14:14:23 -07:00
Akihiro Suda
518709a87e Fix the comment for daemon/logger.Copier
Now daemon/logger.Copier does not use ContainerID

Addendum to #23141

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-06-02 13:10:51 +09:00
Nalin Dahyabhai
7772d270c0 Remove the logger.Message ContainerID field
Log drivers are instantiated on a per-container basis, and passed the
container ID (along with other information) when they're initialized.
Drivers that care about that value are caching the value that they're
passed when they're initialized and using it in favor of the value
contained in Message structures that are passed to them, so the field in
Messages is unused, so we remove it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-05-31 16:41:29 -04:00
Daniel Dao
84e14754e1 only close LogDriver after LogCopier is done
this prevents the copier from sending messages in the buffer to the closed
driver. If the copied took longer than the timeout to drain the buffer, this
aborts the copier read loop and return back so we can cleanup resources
properly.

Signed-off-by: Daniel Dao <dqminh@cloudflare.com>
2016-01-18 17:47:57 +00:00
Ankush Agarwal
41d85c014d Doc fixes in logger, update NewCopier method
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2015-07-29 10:05:46 -07:00
Burke Libbey
f779cfc5d8
Use bufio.Reader instead of bufio.Scanner for logger.Copier
When using a scanner, log lines over 64K will crash the Copier with
bufio.ErrTooLong. Subsequently, the ioutils.bufReader will grow without
bound as the logs are no longer being flushed to disk.

Signed-off-by: Burke Libbey <burke.libbey@shopify.com>
2015-05-29 12:29:42 -04:00
Alexander Morozov
b6a42673ab Wait for copier finishing it's work before closing logger
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-18 13:48:01 -07:00
Alexander Morozov
14887e2e1f Interface Logger for logging drivers
Also there is aux datastructure Copier which can copy lines from streams
to Loggers

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 11:46:59 -07:00