function patchConsole() {
  // Skip if console is already patched...
  if (consolePatched) return;
  /* eslint-disable no-console */
  // $FlowFixMe

  console.log = console.info = (...messages) => {
    logger.info(messagesToDiagnostic(messages));
  }; // $FlowFixMe


  console.debug = (...messages) => {
    // TODO: dedicated debug level?
    logger.verbose(messagesToDiagnostic(messages));
  }; // $FlowFixMe


  console.warn = (...messages) => {
    logger.warn(messagesToDiagnostic(messages));
  }; // $FlowFixMe


  console.error = (...messages) => {
    logger.error(messagesToDiagnostic(messages));
  };
  /* eslint-enable no-console */


  consolePatched = true;
}
/**
 * Patch `console` APIs within workers to forward their messages to the Logger
 * at the appropriate levels.
 * @private
 */
Patch `console` APIs within workers to forward their messages to the Logger
at the appropriate levels.
@private
Patch ` console ` APIs within workers to forward their messages to the Logger at the appropriate levels . @private
function patchConsole() {
  if (consolePatched) return;
  console.log = console.info = (...messages) => {
    logger.info(messagesToDiagnostic(messages));
  }; 
  console.debug = (...messages) => {
    logger.verbose(messagesToDiagnostic(messages));
  }; 
  console.warn = (...messages) => {
    logger.warn(messagesToDiagnostic(messages));
  }; 
  console.error = (...messages) => {
    logger.error(messagesToDiagnostic(messages));
  };
  consolePatched = true;
}
function patchConsole ( ) { if ( consolePatched ) return ; console . log = console . info = ( ... messages ) => { logger . info ( messagesToDiagnostic ( messages ) ) ; } ; console . debug = ( ... messages ) => { logger . verbose ( messagesToDiagnostic ( messages ) ) ; } ; console . warn = ( ... messages ) => { logger . warn ( messagesToDiagnostic ( messages ) ) ; } ; console . error = ( ... messages ) => { logger . error ( messagesToDiagnostic ( messages ) ) ; } ; consolePatched = true ; }
Patch `console` APIs within workers to forward their messages to the Logger
 at the appropriate levels.
Patch ` console ` APIs within workers to forward their messages to the Logger at the appropriate levels .
// Skip if console is already patched... /* eslint-disable no-console */ // $FlowFixMe // $FlowFixMe // TODO: dedicated debug level? // $FlowFixMe // $FlowFixMe /* eslint-enable no-console */