2016-01-06 143 views

回答

1

您可以将特定的日志功能设置为单个查询。你可能可以同步做任何你需要的东西。

尝试类似:

//sample log function 
function notOnlyALogger(msg){ 
    console.log('hey, Im a single log'); 
    //do whatever you need in here 
    console.log(msg); 
} 

//using the logger only when needed 
MyModel.findall({where:{foo:'bar'}, logging: notOnlyALogger }); 

,你应该罚款。

相关问题