2016-01-06 57 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 }); 

,你應該罰款。

相關問題