How to suppress logs in tesseract.js

154 views Asked by At

When I call worker.recognize I get

Info in pixReadMemPng: converting (cmap + alpha) ==> RGBA
Info in pixReadMemPng: converting 8 bpp cmap with alpha ==> RGBA

logs in console. How can I get rid of them ?

I tried:

const worker = createWorker({
    logger: m => { }
});

Also

await worker.setParameters({
    debug_file: '/dev/null',
});

Also tried rewriting global console.log and process.stdout, still no luck with getting rid of this log message.

0

There are 0 answers