-
-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
silence() not working #775
Comments
@dschinkel do you also create your migrations with db-migrate create <name> --sql-file I have the same issue, and this is how I create my migrations. And the exports.up = function(db) {
var filePath = path.join(__dirname, 'sqls', '<MIGRATION NAME>.sql');
return new Promise( function( resolve, reject ) {
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
if (err) return reject(err);
console.log('received data: ' + data); (and the same for the Where the large output comes from is all the In order for if (!silenceMode) { console.log('received data: ' + data); } Where @dschinkel if you tell me that you have a different issue, I'll move this to its own GH issue, so as not to pollute this one |
It looks like @wzrdtales proposed a solution here: #453 (comment). @wzrdtales , would you be happy for me to help with its implementation? (no idea how complicated it might end up being) |
just one warning ahead. silencing logs is usually a terrible idea. We used that for integration testing, so we could hide unimportant logs. In production in doubt you wont know what happened, which is bad. Actually there shouldn't be a need to do anything though. Line 98 in 50b34a8
In v2, just in the config object.
|
I do not want logs of my migration SQL statements. Has this been resolved?
this does not work:
dbmigrate.silence(true);
What can we do to get this to actually work. Is this a bug?
I would not expect to go and manually modify every migration.
I run migrations during tests and I also do not want console logs everywhere when those run migrations every time. It slows down my tests.
I don't know why this issue is being ignored when I see several issues out there on this.
We should be able to rely on silence() and not have to manually remove that console log in every migration file.
Please update the docs and take silence out if it's not working...why is it in the docs if silence doesn't even work?
The text was updated successfully, but these errors were encountered: