From 77503958694d80973787e147220c6ef60f78e36f Mon Sep 17 00:00:00 2001
From: felmer <franz-josef.elmer@id.ethz.ch>
Date: Wed, 16 Jan 2019 15:05:36 +0100
Subject: [PATCH] SSDM-7430: log improved in AttachmentsSynchronizer.

---
 .../parallelizedExecutor/AttachmentsSynchronizer.java         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentsSynchronizer.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentsSynchronizer.java
index 3042c04af46..14cc184bfa4 100644
--- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentsSynchronizer.java
+++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/parallelizedExecutor/AttachmentsSynchronizer.java
@@ -185,7 +185,7 @@ public class AttachmentsSynchronizer implements ITaskExecutor<List<IncomingEntit
         private void log(List<IncomingEntity<?>> entities, int numberOfEntitiesWithAttachments, String description)
         {
             List<String> ids = entities.stream().map(IncomingEntity::getIdentifer).collect(Collectors.toList());
-            String idsAsString = CollectionUtils.abbreviate(ids, 100);
+            String idsAsString = CollectionUtils.abbreviate(ids, 200);
             monitor.log(String.format("%4d (of %4d) %ss %s. %s", 
                     numberOfEntitiesWithAttachments, entities.size(), entityKind, description, idsAsString));
         }
@@ -193,11 +193,11 @@ public class AttachmentsSynchronizer implements ITaskExecutor<List<IncomingEntit
         public <AH extends IPermIdHolder & IAttachmentsHolder> void handle(List<IncomingEntity<?>> entities)
         {
             List<IncomingEntity<?>> filteredEntities = entities.stream().filter(e -> e.hasAttachments()).collect(Collectors.toList());
-            log(entities, filteredEntities.size(), "with attachments on data source");
             if (filteredEntities.isEmpty())
             {
                 return;
             }
+            log(entities, filteredEntities.size(), "with attachments on data source");
             Map<String, Map<String, Attachment>> existingAttachments = retrievAttachments(v3api, sessionToken, entities);
             log(entities, existingAttachments.size(), "on harvester");
             Map<String, Map<String, Attachment>> attachmentsFromDataSource =
-- 
GitLab