Skip to content

Commit f91491f

Browse files
committed
Do not show err when log comes from container that is stopped
1 parent 0587cb1 commit f91491f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/logstream/logstream.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ func (m *LogStream) DisconnectContainer(container LogProducingContainer) error {
468468
for _, consumer := range m.consumers {
469469
if consumer.container.GetContainerID() == container.GetContainerID() {
470470
consumerFound = true
471+
m.log.Info().Str("Container", consumer.name).Msg("Stopping consumer")
471472
if stopErr := consumer.stop(); err != nil {
472473
m.log.Error().
473474
Err(stopErr).
@@ -787,11 +788,6 @@ func (g *ContainerLogConsumer) Accept(l tc.Log) {
787788
}
788789

789790
if g.isDone {
790-
g.ls.log.Error().
791-
Str("Test", g.ls.testName).
792-
Str("Container", g.name).
793-
Str("Log", string(l.Content)).
794-
Msg("Consumer has finished, but you are still trying to accept logs. This should never happen")
795791
return
796792
}
797793

0 commit comments

Comments
 (0)