@@ -121,21 +121,27 @@ func (s *composeService) Watch(ctx context.Context, project *types.Project, serv
121
121
dotGitIgnore ,
122
122
)
123
123
124
- var paths []string
124
+ var paths , pathLogs []string
125
125
for _ , trigger := range config .Watch {
126
126
if checkIfPathAlreadyBindMounted (trigger .Path , service .Volumes ) {
127
127
logrus .Warnf ("path '%s' also declared by a bind mount volume, this path won't be monitored!\n " , trigger .Path )
128
128
continue
129
129
}
130
130
paths = append (paths , trigger .Path )
131
+ pathLogs = append (pathLogs , fmt .Sprintf ("Action %s for path %q" , trigger .Action , trigger .Path ))
131
132
}
132
133
133
134
watcher , err := watch .NewWatcher (paths , ignore )
134
135
if err != nil {
135
136
return err
136
137
}
137
138
138
- fmt .Fprintf (s .stdinfo (), "watching %s\n " , paths )
139
+ fmt .Fprintf (
140
+ s .stdinfo (),
141
+ "Watch configuration for service %q:%s\n " ,
142
+ service .Name ,
143
+ strings .Join (append ([]string {"" }, pathLogs ... ), "\n - " ),
144
+ )
139
145
err = watcher .Start ()
140
146
if err != nil {
141
147
return err
@@ -420,7 +426,7 @@ func (s *composeService) handleWatchBatch(ctx context.Context, project *types.Pr
420
426
if batch [i ].Action == types .WatchActionRebuild {
421
427
fmt .Fprintf (
422
428
s .stdinfo (),
423
- "Rebuilding %s after changes were detected:%s\n " ,
429
+ "Rebuilding service %q after changes were detected:%s\n " ,
424
430
serviceName ,
425
431
strings .Join (append ([]string {"" }, batch [i ].HostPath ), "\n - " ),
426
432
)
@@ -477,7 +483,7 @@ func writeWatchSyncMessage(w io.Writer, serviceName string, pathMappings []sync.
477
483
}
478
484
fmt .Fprintf (
479
485
w ,
480
- "Syncing %s after changes were detected:%s\n " ,
486
+ "Syncing %q after changes were detected:%s\n " ,
481
487
serviceName ,
482
488
strings .Join (append ([]string {"" }, hostPathsToSync ... ), "\n - " ),
483
489
)
@@ -488,7 +494,7 @@ func writeWatchSyncMessage(w io.Writer, serviceName string, pathMappings []sync.
488
494
}
489
495
fmt .Fprintf (
490
496
w ,
491
- "Syncing %s after %d changes were detected\n " ,
497
+ "Syncing service %q after %d changes were detected\n " ,
492
498
serviceName ,
493
499
len (pathMappings ),
494
500
)
0 commit comments