Skip to content

Commit

Permalink
Add more logging while saving annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed May 17, 2024
1 parent 7f38fe2 commit 5bc2645
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 1.28.3

### Changes
- Log more when saving annotations ([#1525](../../pull/1525))

## 1.28.2

### Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5bc2645

Please sign in to comment.