From 99d1262ff17692d0598c0023d162071e2078e3d7 Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Tue, 30 Jul 2024 09:30:25 -0400 Subject: [PATCH] refactor: enable warn logs; add a warning when we are skipping an annotation (#20786) --- bbb-export-annotations/lib/utils/logger.js | 4 +--- bbb-export-annotations/workers/process.js | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bbb-export-annotations/lib/utils/logger.js b/bbb-export-annotations/lib/utils/logger.js index f54f13cfc9..e6d638d3ff 100644 --- a/bbb-export-annotations/lib/utils/logger.js +++ b/bbb-export-annotations/lib/utils/logger.js @@ -36,9 +36,7 @@ module.exports = class Logger { } warn(...messages) { - if (debug) { - console.log(date(), 'WARN\t', `[${this.context}]`, ...parse(messages)); - } + console.log(date(), 'WARN\t', `[${this.context}]`, ...parse(messages)); } error(...messages) { diff --git a/bbb-export-annotations/workers/process.js b/bbb-export-annotations/workers/process.js index 2107f0d5a1..e981833f80 100644 --- a/bbb-export-annotations/workers/process.js +++ b/bbb-export-annotations/workers/process.js @@ -704,6 +704,7 @@ function overlay_triangle(svg, annotation) { function overlay_text(svg, annotation) { if (annotation.size == null || annotation.size.length < 2) { + logger.warn("An annotation of type text had a missing or malformed property size and was excluded from the extraction. " + JSON.stringify(annotation)); return }