log(level, message, exception = undefined) {
    if (level < mr.Logger.level) {
      return;
    }

    // Logging will occur at the current logging level. If the message is a
    // lazy-evaluated one, eval now.
    if (typeof message == 'function') {
      message = message();
    }

    // For non-debug builds, make an effort to programmatically scrub message
    // text that potentially contains personally-identifying information.
    // However, note that this only covers some of the more-obvious forms of
    // PII, and no heuristic can ever hope to provide 100% safety. Also, some of
    // the regular expressions may sometimes match more or less than what was
    // intended.
    mr.Assertions.assert(
        typeof message == 'string', 'Expected message to be a string.');
    if (!mr.Config.isDebugChannel) {
      message = message.replace(mr.Logger.URL_REGEXP_, '[Redacted URL]');
      message = message.replace(
          mr.Logger.DOMAIN_OR_EMAIL_REGEXP_, '[Redacted domain/email]');
      message = message.replace(mr.Logger.SINK_ID_REGEXP_, (match, p1, p2) => {
        return p1 + ':<' + p2.substr(-4) + '>';
      });
    }

    const record = {
      logger: this.name_,
      level: level,
      time: Date.now(),
      message: message,
      exception: exception,
    };
    mr.Logger.handlers_.forEach(handler => handler(record));
  }
/**
   * Logs a message at the specified log level with an optional exception.
   *
   * @param {mr.Logger.Level} level
   * @param {mr.Logger.Loggable} message
   * @param {*=} exception An exception to associate with the log message.  This
   *     should normally be an Error instance for best results, but any type is
   *     acceptable.
   */
Logs a message at the specified log level with an optional exception.
@param {mr.Logger.Level} level
@param {mr.Logger.Loggable} message
@param {*=} exception An exception to associate with the log message.  This
should normally be an Error instance for best results, but any type is
acceptable.
Logs a message at the specified log level with an optional exception . @param { mr . Logger . Level } level @param { mr . Logger . Loggable } message @param { * = } exception An exception to associate with the log message . This should normally be an Error instance for best results but any type is acceptable .
log(level, message, exception = undefined) {
    if (level < mr.Logger.level) {
      return;
    }
    if (typeof message == 'function') {
      message = message();
    }
    mr.Assertions.assert(
        typeof message == 'string', 'Expected message to be a string.');
    if (!mr.Config.isDebugChannel) {
      message = message.replace(mr.Logger.URL_REGEXP_, '[Redacted URL]');
      message = message.replace(
          mr.Logger.DOMAIN_OR_EMAIL_REGEXP_, '[Redacted domain/email]');
      message = message.replace(mr.Logger.SINK_ID_REGEXP_, (match, p1, p2) => {
        return p1 + ':<' + p2.substr(-4) + '>';
      });
    }
    const record = {
      logger: this.name_,
      level: level,
      time: Date.now(),
      message: message,
      exception: exception,
    };
    mr.Logger.handlers_.forEach(handler => handler(record));
  }
log ( level , message , exception = undefined ) { if ( level < mr . Logger . level ) { return ; } if ( typeof message == 'function' ) { message = message ( ) ; } mr . Assertions . assert ( typeof message == 'string' , 'Expected message to be a string.' ) ; if ( ! mr . Config . isDebugChannel ) { message = message . replace ( mr . Logger . URL_REGEXP_ , '[Redacted URL]' ) ; message = message . replace ( mr . Logger . DOMAIN_OR_EMAIL_REGEXP_ , '[Redacted domain/email]' ) ; message = message . replace ( mr . Logger . SINK_ID_REGEXP_ , ( match , p1 , p2 ) => { return p1 + ':<' + p2 . substr ( - 4 ) + '>' ; } ) ; } const record = { logger : this . name_ , level : level , time : Date . now ( ) , message : message , exception : exception , } ; mr . Logger . handlers_ . forEach ( handler => handler ( record ) ) ; }
Logs a message at the specified log level with an optional exception.
Logs a message at the specified log level with an optional exception .
// Logging will occur at the current logging level. If the message is a // lazy-evaluated one, eval now. // For non-debug builds, make an effort to programmatically scrub message // text that potentially contains personally-identifying information. // However, note that this only covers some of the more-obvious forms of // PII, and no heuristic can ever hope to provide 100% safety. Also, some of // the regular expressions may sometimes match more or less than what was // intended.