diff --git a/pkg/compose/watch.go b/pkg/compose/watch.go index 0a6590605d1..9ad0567f1ea 100644 --- a/pkg/compose/watch.go +++ b/pkg/compose/watch.go @@ -547,19 +547,24 @@ func (s *composeService) handleWatchBatch(ctx context.Context, project *types.Pr // writeWatchSyncMessage prints out a message about the sync for the changed paths. func writeWatchSyncMessage(log api.LogConsumer, serviceName string, pathMappings []sync.PathMapping) { - const maxPathsToShow = 10 - if len(pathMappings) <= maxPathsToShow || logrus.IsLevelEnabled(logrus.DebugLevel) { + if logrus.IsLevelEnabled(logrus.DebugLevel) { hostPathsToSync := make([]string, len(pathMappings)) for i := range pathMappings { 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 { - hostPathsToSync := make([]string, len(pathMappings)) - for i := range pathMappings { - hostPathsToSync[i] = pathMappings[i].HostPath - } - log.Log(api.WatchLogger, 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)), + ) } }