public/javascripts/yui/logger/logger.js
function(aEntries) {
        // Manage the number of messages displayed in the console
        var entriesLen         = aEntries.length,
            df                 = d.createDocumentFragment(),
            msgHTML            = [],
            thresholdMin       = this.thresholdMin,
            sourceFiltersLen   = this._sourceFilters.length,
            categoryFiltersLen = this._categoryFilters.length,
            entriesStartIndex,
            i, j, msg, before;

        if(isNaN(thresholdMin) || (thresholdMin > this.thresholdMax)) {
            thresholdMin = 0;
        }
        entriesStartIndex = (entriesLen > thresholdMin) ? (entriesLen - thresholdMin) : 0;
        
        // Iterate through all log entries 
        for(i=entriesStartIndex; i<entriesLen; i++) {
            // Print only the ones that filter through
            var okToPrint = false,
                okToFilterCats = false,
                entry = aEntries[i],
                source = entry.source,
                category = entry.category;

            for(j=0; j<sourceFiltersLen; j++) {
                if(source == this._sourceFilters[j]) {
                    okToFilterCats = true;
                    break;
                }
            }
            if(okToFilterCats) {
                for(j=0; j<categoryFiltersLen; j++) {
                    if(category == this._categoryFilters[j]) {
                        okToPrint = true;
                        break;
                    }
                }
            }
            if(okToPrint) {
                // Start from 0ms elapsed time
                if (this._consoleMsgCount === 0) {
                    this._lastTime = entry.time.getTime();
                }

                msg = this.formatMsg(entry);
                if (typeof msg === 'string') {
                    msgHTML[msgHTML.length] = msg;
                } else {
                    df.insertBefore(msg, this.newestOnTop ?
                        df.firstChild || null : null);
                }
                this._consoleMsgCount++;
                this._lastTime = entry.time.getTime();
            }
        }

        if (msgHTML.length) {
            msgHTML.splice(0,0,this._elConsole.innerHTML);
            this._elConsole.innerHTML = this.newestOnTop ?
                                            msgHTML.reverse().join('') :
                                            msgHTML.join('');
        } else if (df.firstChild) {
            this._elConsole.insertBefore(df, this.newestOnTop ?
                        this._elConsole.firstChild || null : null);
        }
    }
function(aEntries) {
        // Manage the number of messages displayed in the console
        var entriesLen         = aEntries.length,
            df                 = d.createDocumentFragment(),
            msgHTML            = [],
            thresholdMin       = this.thresholdMin,
            sourceFiltersLen   = this._sourceFilters.length,
            categoryFiltersLen = this._categoryFilters.length,
            entriesStartIndex,
            i, j, msg, before;

        if(isNaN(thresholdMin) || (thresholdMin > this.thresholdMax)) {
            thresholdMin = 0;
        }
        entriesStartIndex = (entriesLen > thresholdMin) ? (entriesLen - thresholdMin) : 0;
        
        // Iterate through all log entries 
        for(i=entriesStartIndex; i<entriesLen; i++) {
            // Print only the ones that filter through
            var okToPrint = false,
                okToFilterCats = false,
                entry = aEntries[i],
                source = entry.source,
                category = entry.category;

            for(j=0; j<sourceFiltersLen; j++) {
                if(source == this._sourceFilters[j]) {
                    okToFilterCats = true;
                    break;
                }
            }
            if(okToFilterCats) {
                for(j=0; j<categoryFiltersLen; j++) {
                    if(category == this._categoryFilters[j]) {
                        okToPrint = true;
                        break;
                    }
                }
            }
            if(okToPrint) {
                // Start from 0ms elapsed time
                if (this._consoleMsgCount === 0) {
                    this._lastTime = entry.time.getTime();
                }

                msg = this.formatMsg(entry);
                if (typeof msg === 'string') {
                    msgHTML[msgHTML.length] = msg;
                } else {
                    df.insertBefore(msg, this.newestOnTop ?
                        df.firstChild || null : null);
                }
                this._consoleMsgCount++;
                this._lastTime = entry.time.getTime();
            }
        }

        if (msgHTML.length) {
            msgHTML.splice(0,0,this._elConsole.innerHTML);
            this._elConsole.innerHTML = this.newestOnTop ?
                                            msgHTML.reverse().join('') :
                                            msgHTML.join('');
        } else if (df.firstChild) {
            this._elConsole.insertBefore(df, this.newestOnTop ?
                        this._elConsole.firstChild || null : null);
        }
    }
function ( aEntries ) { // Manage the number of messages displayed in the console var entriesLen = aEntries . length , df = d . createDocumentFragment ( ) , msgHTML = [ ] , thresholdMin = this . thresholdMin , sourceFiltersLen = this . _sourceFilters . length , categoryFiltersLen = this . _categoryFilters . length , entriesStartIndex , i , j , msg , before ; if ( isNaN ( thresholdMin ) || ( thresholdMin > this . thresholdMax ) ) { thresholdMin = 0 ; } entriesStartIndex = ( entriesLen > thresholdMin ) ? ( entriesLen - thresholdMin ) : 0 ; // Iterate through all log entries  for ( i = entriesStartIndex ; i < entriesLen ; i ++ ) { // Print only the ones that filter through var okToPrint = false , okToFilterCats = false , entry = aEntries [ i ] , source = entry . source , category = entry . category ; for ( j = 0 ; j < sourceFiltersLen ; j ++ ) { if ( source == this . _sourceFilters [ j ] ) { okToFilterCats = true ; break ; } } if ( okToFilterCats ) { for ( j = 0 ; j < categoryFiltersLen ; j ++ ) { if ( category == this . _categoryFilters [ j ] ) { okToPrint = true ; break ; } } } if ( okToPrint ) { // Start from 0ms elapsed time if ( this . _consoleMsgCount === 0 ) { this . _lastTime = entry . time . getTime ( ) ; } msg = this . formatMsg ( entry ) ; if ( typeof msg === 'string' ) { msgHTML [ msgHTML . length ] = msg ; } else { df . insertBefore ( msg , this . newestOnTop ? df . firstChild || null : null ) ; } this . _consoleMsgCount ++ ; this . _lastTime = entry . time . getTime ( ) ; } } if ( msgHTML . length ) { msgHTML . splice ( 0 , 0 , this . _elConsole . innerHTML ) ; this . _elConsole . innerHTML = this . newestOnTop ? msgHTML . reverse ( ) . join ( '' ) : msgHTML . join ( '' ) ; } else if ( df . firstChild ) { this . _elConsole . insertBefore ( df , this . newestOnTop ? this . _elConsole . firstChild || null : null ) ; } }
Cycles through an array of log messages, and outputs each one to the console
if its category has not been filtered out.

@method _printToConsole
@param aEntries {Object[]} Array of LogMsg objects to output to console.
@private
Cycles through an array of log messages and outputs each one to the console if its category has not been filtered out .