title: How to suppress console output in Tesseract.js?
body: <p>Tesseract.js seems to print to the console with every call to .recognize(), even with no option parameters attached.</p>
  
  <p>It seems possible to quiet the output with the Tesseract CLI by using the "quiet" flag, but I can't find anything like that for Tesseract.js.</p>
  
  <p>I've scanned through the parameters that could be passed to "options" as found on the Tesseract.js repository:
  <a href="https://github.com/naptha/tesseract.js/blob/master/docs/tesseract_parameters.md" rel="nofollow noreferrer">https://github.com/naptha/tesseract.js/blob/master/docs/tesseract_parameters.md</a></p>
  
  <p>I've tried setting everything that has to do with "DEBUG" to 0, and I've tried sending the output to a "debug_file" parameter, but nothing I do seems to change the console output.</p>
  
  <p>Here's a basic example with no parameters on the "options" object:</p>
  
  <pre><code>const fs = require('fs');
  const Tesseract = require('tesseract.js');
  
  const image = fs.readFileSync('path/to/image.jpg');
  const options = {};
  
  Tesseract.recognize(image, options)
           .finally((resultOrError) =&gt; {
               Tesseract.terminate();
           }
  );
  
  </code></pre>
  
  <p>I would expect there to be no output at all here, but instead this gets printed:</p>
  
  <pre><code>pre-main prep time: 76 ms
  { text: '',
    html: '&lt;div class=\'ocr_page\' id=\'page_1\' title=\'image ""; bbox 0 0 600 80; ppageno 0\'&gt;\n&lt;/div&gt;\n',
    confidence: 0,
    blocks: [],
    psm: 'SINGLE_BLOCK',
    oem: 'DEFAULT',
    version: '3.04.00',
    paragraphs: [],
    lines: [],
    words: [],
    symbols: [] }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Okay, okay. It's early in the morning, I could have tried a little harder here. It looks like Tesseract.js automatically dumps everything to the console if you don't make calls to .catch() and .then(). With the example below, most of the console output disappears.</p>
  
  <pre><code>const fs = require('fs');
  const Tesseract = require('tesseract.js');
  
  const image = fs.readFileSync('path/to/image.jpg');
  const options = {};
  
  const doSomethingWithResult = (result) =&gt; { result };
  const doSomethingWithError = (error) =&gt; { error };
  
  Tesseract.recognize(image, options)
           .then(result =&gt; doSomethingWithResult(result))
           .catch(err =&gt; doSomethingWithError(err))
           .finally((resultOrError) =&gt; {
               Tesseract.terminate();
           }
  );
  
  </code></pre>
  
  <p>Now, only this gets printed to the console:</p>
  
  <pre><code>pre-main prep time: 66 ms
  </code></pre>
  
  <p>I'd still like a way to suppress this, so I'm going to leave the question unanswered for now. I hope someone can chime in with a suggestion.</p>