Skip to content

Commit 34a4579

Browse files
author
rafael_chicoli
committed
driver: add comments
1 parent 7fcccbf commit 34a4579

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

pkg/docker/driver.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ func (d *Driver) StartLogging(file string, info logger.Info) error {
334334
// StopLogging ...
335335
func (d *Driver) StopLogging(file string) error {
336336

337+
// this is required for some environment like travis
338+
// otherwise the start and stop function are executed
339+
// too fast, even before messages are sent to the pipeline
337340
time.Sleep(1 * time.Second)
338341

339342
d.mu.Lock()
@@ -366,16 +369,7 @@ func (d *Driver) StopLogging(file string) error {
366369
}
367370

368371
// if c.esClient != nil {
369-
370-
// if err := c.esClient.Flush(); err != nil {
371-
// l.Printf("error: flushing queue: %v", err)
372-
// }
373-
374-
// l.Printf("info: closing client: %v", c.esClient)
375-
// if err := c.esClient.Close(); err != nil {
376-
// l.Printf("error: closing client connection: %v\n", err)
377-
// }
378-
// c.esClient.Stop()
372+
// close client connection on last pipeline
379373
// }
380374

381375
// l.Printf("info: done stopping logger for containerID=[%v] and socket=[%v]\n", c.info.ContainerID, filename)

0 commit comments

Comments
 (0)