diff --git a/api.js b/api.js index 7c77fa3..d08e9a2 100644 --- a/api.js +++ b/api.js @@ -21,6 +21,15 @@ var BotanJS = function() util.inherits( BotanJS, events.EventEmitter ); +var _trim = function( s ) +{ + if( 100 < s.length ) + { + return "[BLOB: " + s.substr( 0, 20 ) + " ...]"; + } + return s; +}; + BotanJS.prototype.unshift = function() { for( var i in arguments ) @@ -107,7 +116,7 @@ BotanJS.prototype.compile = function( type ) { _self.storeForRender( rainet, type, ch ); - Dragonfly.Debug( "Storing " + ch + " to fastcache[ " + fastCache.id + " ]" ); + Dragonfly.Debug( "Storing " + _trim( ch ) + " to fastcache[ " + fastCache.id + " ]" ); fastCache.spawn( 10 ); fastCache.set( type, ch );