function textFilter_(textFilters, sourceEntry) {
    var tablePrinter = null;
    for (var i = 0; i < textFilters.length; ++i) {
      var text = textFilters[i].text;
      var negated = textFilters[i].negated;
      var match = false;
      // The description is often not contained in one of the log entries.
      // The source type almost never is, so check for them directly.
      var description = sourceEntry.getDescription().toLowerCase();
      var type = sourceEntry.getSourceTypeString().toLowerCase();
      if (description.indexOf(text) != -1 || type.indexOf(text) != -1) {
        match = true;
      } else {
        if (!tablePrinter)
          tablePrinter = sourceEntry.createTablePrinter();
        match = tablePrinter.search(text);
      }
      if (negated)
        match = !match;
      if (!match)
        return false;
    }
    return true;
  }
/**
   * Takes in a list of text filters and a SourceEntry.  Each filter has
   * "text" and "negated" fields.  Returns true if the SourceEntry matches all
   * filters in the (possibly empty) list.
   */
Takes in a list of text filters and a SourceEntry.  Each filter has
"text" and "negated" fields.  Returns true if the SourceEntry matches all
filters in the (possibly empty) list.
Takes in a list of text filters and a SourceEntry . Each filter has " text " and " negated " fields . Returns true if the SourceEntry matches all filters in the ( possibly empty ) list .
function textFilter_(textFilters, sourceEntry) {
    var tablePrinter = null;
    for (var i = 0; i < textFilters.length; ++i) {
      var text = textFilters[i].text;
      var negated = textFilters[i].negated;
      var match = false;
      var description = sourceEntry.getDescription().toLowerCase();
      var type = sourceEntry.getSourceTypeString().toLowerCase();
      if (description.indexOf(text) != -1 || type.indexOf(text) != -1) {
        match = true;
      } else {
        if (!tablePrinter)
          tablePrinter = sourceEntry.createTablePrinter();
        match = tablePrinter.search(text);
      }
      if (negated)
        match = !match;
      if (!match)
        return false;
    }
    return true;
  }
function textFilter_ ( textFilters , sourceEntry ) { var tablePrinter = null ; for ( var i = 0 ; i < textFilters . length ; ++ i ) { var text = textFilters [ i ] . text ; var negated = textFilters [ i ] . negated ; var match = false ; var description = sourceEntry . getDescription ( ) . toLowerCase ( ) ; var type = sourceEntry . getSourceTypeString ( ) . toLowerCase ( ) ; if ( description . indexOf ( text ) != - 1 || type . indexOf ( text ) != - 1 ) { match = true ; } else { if ( ! tablePrinter ) tablePrinter = sourceEntry . createTablePrinter ( ) ; match = tablePrinter . search ( text ) ; } if ( negated ) match = ! match ; if ( ! match ) return false ; } return true ; }
Takes in a list of text filters and a SourceEntry.
Takes in a list of text filters and a SourceEntry .
// The description is often not contained in one of the log entries. // The source type almost never is, so check for them directly.