Trim excessive logs

This commit is contained in:
斟酌 鵬兄 2022-04-05 18:12:13 +09:00
parent 81dd7dc96b
commit dbc5ba66e1

11
api.js
View File

@ -21,6 +21,15 @@ var BotanJS = function()
util.inherits( BotanJS, events.EventEmitter ); 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() BotanJS.prototype.unshift = function()
{ {
for( var i in arguments ) for( var i in arguments )
@ -107,7 +116,7 @@ BotanJS.prototype.compile = function( type )
{ {
_self.storeForRender( rainet, type, ch ); _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.spawn( 10 );
fastCache.set( type, ch ); fastCache.set( type, ch );