@@ -22,7 +22,6 @@ import (
22
22
"github.com/docker/libcompose/docker/ctx"
23
23
"github.com/docker/libcompose/docker/image"
24
24
"github.com/docker/libcompose/labels"
25
- "github.com/docker/libcompose/logger"
26
25
"github.com/docker/libcompose/project"
27
26
"github.com/docker/libcompose/project/events"
28
27
"github.com/docker/libcompose/project/options"
@@ -37,8 +36,10 @@ type Service struct {
37
36
project * project.Project
38
37
serviceConfig * config.ServiceConfig
39
38
clientFactory composeclient.Factory
40
- loggerFactory logger.Factory
41
39
authLookup auth.Lookup
40
+
41
+ // FIXME(vdemeester) remove this at some point
42
+ context * ctx.Context
42
43
}
43
44
44
45
// NewService creates a service
@@ -49,7 +50,7 @@ func NewService(name string, serviceConfig *config.ServiceConfig, context *ctx.C
49
50
serviceConfig : serviceConfig ,
50
51
clientFactory : context .ClientFactory ,
51
52
authLookup : context .AuthLookup ,
52
- loggerFactory : context . LoggerFactory ,
53
+ context : context ,
53
54
}
54
55
}
55
56
@@ -198,7 +199,7 @@ func (s *Service) build(ctx context.Context, buildOptions options.Build) error {
198
199
NoCache : buildOptions .NoCache ,
199
200
ForceRemove : buildOptions .ForceRemove ,
200
201
Pull : buildOptions .Pull ,
201
- LoggerFactory : s .loggerFactory ,
202
+ LoggerFactory : s .context . LoggerFactory ,
202
203
}
203
204
return builder .Build (ctx , s .imageName ())
204
205
}
@@ -584,7 +585,7 @@ func (s *Service) Log(ctx context.Context, follow bool) error {
584
585
if s .Config ().ContainerName != "" {
585
586
name = s .Config ().ContainerName
586
587
}
587
- l := s .loggerFactory .CreateContainerLogger (name )
588
+ l := s .context . LoggerFactory .CreateContainerLogger (name )
588
589
return c .Log (ctx , l , follow )
589
590
})
590
591
}
0 commit comments