Core: show parsed data in debug log. See #1084

This commit is contained in:
Rob Garrison 2015-12-01 08:14:19 -06:00
parent 3dfed568de
commit 78c23a0bc1

View File

@ -939,7 +939,20 @@
ts.isProcessing( table ); // remove processing icon
}
if ( c.debug ) {
console.log( 'Building cache for ' + totalRows + ' rows' + ts.benchmark( cacheTime ) );
len = Math.min( 5, c.totalRows );
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + totalRows +
' rows (showing ' + len + ' rows)' + ts.benchmark( cacheTime ) );
val = {};
for ( colIndex = 0; colIndex < c.columns; colIndex++ ) {
for ( cacheIndex = 0; cacheIndex < len; cacheIndex++ ) {
if ( !val[ 'row: ' + cacheIndex ] ) {
val[ 'row: ' + cacheIndex ] = {};
}
val[ 'row: ' + cacheIndex ][ c.headerContent[ colIndex ] ] = cache.normalized[ cacheIndex ][ colIndex ];
}
}
console[ console.table ? 'table' : 'log' ]( val );
if ( console.groupEnd ) { console.groupEnd(); }
}
if ( $.isFunction( callback ) ) {
callback( table );