refactor: enable warn logs; add a warning when we are skipping an annotation (#20786)
This commit is contained in:
parent
1e2731ef63
commit
99d1262ff1
@ -36,10 +36,8 @@ 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) {
|
||||||
console.log(date(), 'ERROR\t', `[${this.context}]`, ...parse(messages));
|
console.log(date(), 'ERROR\t', `[${this.context}]`, ...parse(messages));
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user