From 5bc264502f0ce1dd8cfd1a843bab410f4c98a921 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 17 May 2024 14:05:09 -0400 Subject: [PATCH] Add more logging while saving annotations --- CHANGELOG.md | 5 +++++ .../web_client/templates/imageViewerSelectWidget.pug | 2 +- .../girder_large_image_annotation/models/annotation.py | 7 ++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbe9cf314..fcc954875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 1.28.3 + +### Changes +- Log more when saving annotations ([#1525](../../pull/1525)) + ## 1.28.2 ### Improvements diff --git a/girder/girder_large_image/web_client/templates/imageViewerSelectWidget.pug b/girder/girder_large_image/web_client/templates/imageViewerSelectWidget.pug index e5678b7fb..599e1cd36 100644 --- a/girder/girder_large_image/web_client/templates/imageViewerSelectWidget.pug +++ b/girder/girder_large_image/web_client/templates/imageViewerSelectWidget.pug @@ -2,7 +2,7 @@ .g-item-info-header i.icon-picture span Image Viewer - select.form-control.input-sm.image-viewer-control + select#image-viewer-control.form-control.input-sm.image-viewer-control each viewer in viewers option(value=viewer.name) #{viewer.label} .image-controls diff --git a/girder_annotation/girder_large_image_annotation/models/annotation.py b/girder_annotation/girder_large_image_annotation/models/annotation.py index 172c5c2a6..aec66dcd5 100644 --- a/girder_annotation/girder_large_image_annotation/models/annotation.py +++ b/girder_annotation/girder_large_image_annotation/models/annotation.py @@ -978,7 +978,12 @@ def insertElements(doc, *args, **kwargs): annotation.pop('groups', None) self.injectAnnotationGroupSet(annotation) - logger.debug('Saved annotation in %5.3fs' % (time.time() - starttime)) + if annotation['annotation'].get('elements') is not None: + logger.info( + 'Saved annotation %s in %5.3fs with %d element(s)', + annotation.get('_id', None), + time.time() - starttime, + len(annotation['annotation']['elements'])) events.trigger('large_image.annotations.save_history', { 'annotation': annotation, }, asynchronous=True)