File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1+ import byline from "byline" ;
12import { Duration , TemporalUnit } from "node-duration" ;
23import { BoundPorts } from "./bound-ports" ;
34import { Container , HealthCheckStatus } from "./container" ;
45import { ContainerState } from "./container-state" ;
56import { DockerClient } from "./docker-client" ;
6- import { log } from "./logger" ;
7+ import { log , containerLog } from "./logger" ;
78import { Port } from "./port" ;
89import { PortCheck } from "./port-check" ;
910import { IntervalRetryStrategy } from "./retry-strategy" ;
@@ -86,20 +87,23 @@ export class LogWaitStrategy extends AbstractWaitStrategy {
8687 const stream = await container . logs ( ) ;
8788
8889 return new Promise ( ( resolve , reject ) => {
89- stream
90+ byline ( stream )
9091 . on ( "data" , ( line ) => {
92+ containerLog . trace ( `Received log line: ${ line } ` ) ;
9193 if ( line . includes ( this . message ) ) {
9294 stream . destroy ( ) ;
9395 resolve ( ) ;
9496 }
9597 } )
9698 . on ( "err" , ( line ) => {
99+ containerLog . trace ( `Received log line error: ${ line } ` ) ;
97100 if ( line . includes ( this . message ) ) {
98101 stream . destroy ( ) ;
99102 resolve ( ) ;
100103 }
101104 } )
102105 . on ( "end" , ( ) => {
106+ containerLog . trace ( `Log stream closed` ) ;
103107 stream . destroy ( ) ;
104108 reject ( ) ;
105109 } ) ;
You can’t perform that action at this time.
0 commit comments