Add logging for PDF exports
This commit is contained in:
parent
9829ea7009
commit
5e0674b842
1 changed files with 4 additions and 0 deletions
|
@ -152,6 +152,8 @@ class PDFWorker {
|
|||
if (!attachment.isPDFAttachment()) {
|
||||
throw new Error('Item must be a PDF attachment');
|
||||
}
|
||||
let t = new Date();
|
||||
Zotero.debug(`Exporting PDF for item ${attachment.libraryKey}`);
|
||||
let items = attachment.getAnnotations();
|
||||
items = items.filter(x => !x.annotationIsExternal);
|
||||
let annotations = [];
|
||||
|
@ -200,6 +202,8 @@ class PDFWorker {
|
|||
await Zotero.Items.erase(items.map(x => x.id));
|
||||
}
|
||||
|
||||
Zotero.debug(`Exported PDF with ${annotations.length} annotation(s) in ${new Date() - t} ms`);
|
||||
|
||||
return annotations.length;
|
||||
}, isPriority);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue