diff --git a/lib/template.js b/lib/template.js index d36be851..29d82123 100644 --- a/lib/template.js +++ b/lib/template.js @@ -105,7 +105,7 @@ Template.prototype.sqlFileLoaderTemplate = function () { ' 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);", + " if (db.log.isSilent !== true) console.log('received data: ' + data);", '', ' resolve(data);', ' });', @@ -122,7 +122,7 @@ Template.prototype.sqlFileLoaderTemplate = function () { ' 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);", + " if (db.log.isSilent !== true) console.log('received data: ' + data);", '', ' resolve(data);', ' });', @@ -171,7 +171,7 @@ Template.prototype.sqlFileLoaderIgnoreOnInitTemplate = function () { ' 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);", + " if (db.log.isSilent !== true) console.log('received data: ' + data);", '', ' resolve(data);', ' });', @@ -181,7 +181,7 @@ Template.prototype.sqlFileLoaderIgnoreOnInitTemplate = function () { ' });', ' }', ' else {', - " console.log('ignoring on init: ' + filePath)", + " if (db.log.isSilent !== true) console.log('ignoring on init: ' + filePath)", ' return null;', ' }', '};', @@ -193,7 +193,7 @@ Template.prototype.sqlFileLoaderIgnoreOnInitTemplate = function () { ' 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);", + " if (db.log.isSilent !== true) console.log('received data: ' + data);", '', ' resolve(data);', ' });',