refactor: enable warn logs; add a warning when we are skipping an annotation (#20786)

This commit is contained in:
Anton Georgiev 2024-07-30 09:30:25 -04:00 committed by GitHub
parent 1e2731ef63
commit 99d1262ff1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -36,9 +36,7 @@ module.exports = class Logger {
} }
warn(...messages) { warn(...messages) {
if (debug) { console.log(date(), 'WARN\t', `[${this.context}]`, ...parse(messages));
console.log(date(), 'WARN\t', `[${this.context}]`, ...parse(messages));
}
} }
error(...messages) { error(...messages) {

View File

@ -704,6 +704,7 @@ function overlay_triangle(svg, annotation) {
function overlay_text(svg, annotation) { function overlay_text(svg, annotation) {
if (annotation.size == null || annotation.size.length < 2) { 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 return
} }