diff --git a/core/modules/commander.js b/core/modules/commander.js index 6c4f687e7..ad7f4b5b3 100644 --- a/core/modules/commander.js +++ b/core/modules/commander.js @@ -29,6 +29,24 @@ var Commander = function(commandTokens,callback,wiki,streams) { this.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir); }; +/* +Log a string if verbose flag is set +*/ +Commander.prototype.log = function(str) { + if(this.verbose) { + this.streams.output.write(str + "\n"); + } +}; + +/* +Write a string if verbose flag is set +*/ +Commander.prototype.write = function(str) { + if(this.verbose) { + this.streams.output.write(str); + } +}; + /* Add a string of tokens to the command queue */