show sync files only in debug level

Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
This commit is contained in:
Suleiman Dibirov 2024-09-12 15:04:20 +03:00 committed by Guillaume Lours
parent 2e14191682
commit 8bf0627ea9
1 changed files with 1 additions and 2 deletions

View File

@ -547,8 +547,7 @@ 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