public/javascripts/yui/logger/logger.js
function(sCategory) {
        var filtersArray = this._categoryFilters;
        // Don't do anything if category is already enabled
        // Use Array.indexOf if available...
        if(filtersArray.indexOf) {
             if(filtersArray.indexOf(sCategory) >  -1) {
                return;
            }
        }
        // ...or do it the old-fashioned way
        else {
            for(var i=0; i<filtersArray.length; i++) {
               if(filtersArray[i] === sCategory){
                    return;
                }
            }
        }

        this._categoryFilters.push(sCategory);
        this._filterLogs();
        var elCheckbox = this.getCheckbox(sCategory);
        if(elCheckbox) {
            elCheckbox.checked = true;
        }
    }
function(sCategory) {
        var filtersArray = this._categoryFilters;
        // Don't do anything if category is already enabled
        // Use Array.indexOf if available...
        if(filtersArray.indexOf) {
             if(filtersArray.indexOf(sCategory) >  -1) {
                return;
            }
        }
        // ...or do it the old-fashioned way
        else {
            for(var i=0; i<filtersArray.length; i++) {
               if(filtersArray[i] === sCategory){
                    return;
                }
            }
        }

        this._categoryFilters.push(sCategory);
        this._filterLogs();
        var elCheckbox = this.getCheckbox(sCategory);
        if(elCheckbox) {
            elCheckbox.checked = true;
        }
    }
function ( sCategory ) { var filtersArray = this . _categoryFilters ; // Don't do anything if category is already enabled // Use Array.indexOf if available... if ( filtersArray . indexOf ) { if ( filtersArray . indexOf ( sCategory ) > - 1 ) { return ; } } // ...or do it the old-fashioned way else { for ( var i = 0 ; i < filtersArray . length ; i ++ ) { if ( filtersArray [ i ] === sCategory ) { return ; } } } this . _categoryFilters . push ( sCategory ) ; this . _filterLogs ( ) ; var elCheckbox = this . getCheckbox ( sCategory ) ; if ( elCheckbox ) { elCheckbox . checked = true ; } }
Shows log messages associated with given category.

@method showCategory
@param {String} Category name.
Shows log messages associated with given category .