Skip to content

How to suppress console logs? #941

Answered by Balearica
archasek asked this question in Q&A
Discussion options

You must be logged in to vote

To capture debugging messages in the output object, rather than printing them to console, set the debug to true within the output options.

const worker = await await Tesseract.createWorker("eng");
const ret = await worker.recognize(files[i], undefined, {debug: true});
console.log(ret.data.text);
console.log(`Captured message: ${ret.data.debug}`);
Captured message: Estimating resolution as 390

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by archasek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants