mirror of https://github.com/docker/compose.git
chore(watch): Add changed files path/count to log
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
This commit is contained in:
parent
155f64182a
commit
2e14191682
|
@ -553,13 +553,19 @@ func writeWatchSyncMessage(log api.LogConsumer, serviceName string, pathMappings
|
||||||
for i := range pathMappings {
|
for i := range pathMappings {
|
||||||
hostPathsToSync[i] = pathMappings[i].HostPath
|
hostPathsToSync[i] = pathMappings[i].HostPath
|
||||||
}
|
}
|
||||||
log.Log(api.WatchLogger, fmt.Sprintf("Syncing %q after changes were detected", serviceName))
|
log.Log(
|
||||||
|
api.WatchLogger,
|
||||||
|
fmt.Sprintf(
|
||||||
|
"Syncing %q after changes were detected: %s",
|
||||||
|
serviceName,
|
||||||
|
strings.Join(hostPathsToSync, ", "),
|
||||||
|
),
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
hostPathsToSync := make([]string, len(pathMappings))
|
log.Log(
|
||||||
for i := range pathMappings {
|
api.WatchLogger,
|
||||||
hostPathsToSync[i] = pathMappings[i].HostPath
|
fmt.Sprintf("Syncing service %q after %d changes were detected", serviceName, len(pathMappings)),
|
||||||
}
|
)
|
||||||
log.Log(api.WatchLogger, fmt.Sprintf("Syncing service %q after %d changes were detected", serviceName, len(pathMappings)))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue