如何在记录sql命令时使Sequelize ORM无声?
我正在使用acl-sequelize
库:
var Acl = require('acl');
var Sequelize = require('sequelize');
var AclSeq = require('acl-sequelize');
var db = new Sequelize('mysql://root@localhost:3306/test');
var acl = new Acl(new AclSeq(db, { prefix: 'acl_' }));
我怎样才能保持沉默?
答案 0 :(得分:4)
在选项中,您需要将记录设置为false
var sequelize = new Sequelize('db_name', 'user', 'password', {host:host, dialect:"mysql", logging:false});