diff --git a/README.md b/README.md index 70be99a..961f1e4 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,8 @@ you can generate a filter set for that application: var stormpathConfig = { apiKeyId: 'YOUR_STORMPATH_API_KEY', apiKeySecret: 'YOUR_STORMPATH_API_SECRET', - appHref: 'YOUR_STORMPATH_APP_HREF' + appHref: 'YOUR_STORMPATH_APP_HREF', + quiet: false // Optional. Use "quiet: true" to suppress console logging }; var stormpathFilters = stormpathRestify.createFilterSet(stormpathConfig); @@ -191,4 +192,4 @@ var stormpathFilters = stormpathRestify.createFilterSet({ // all your error are belong to me } }); -``` \ No newline at end of file +``` diff --git a/filters.js b/filters.js index b1fa8c5..9ea82d0 100644 --- a/filters.js +++ b/filters.js @@ -140,7 +140,9 @@ function createFilterSet(_options){ userAgent: 'restify-stormpath/' + pkg.version + ' ' + 'restify/' + require('restify/package').version, }); } - console.log('Initializing Stormpath'); + if(!opts.quiet){ + console.log('Initializing Stormpath'); + } self.getApplication = new Promise(function(resolve,reject){ self.spClient.getApplication(appHref, function(err,app){ @@ -153,7 +155,9 @@ function createFilterSet(_options){ ); }); self.getApplication.then(function(app){ - console.log('Using Stormpath application \'' + app.name + '\''); + if(!opts.quiet){ + console.log('Using Stormpath application \'' + app.name + '\''); + } }); self.getApplication.catch(function(err){ throw err; @@ -182,4 +186,4 @@ function createFilterSet(_options){ module.exports = { createFilterSet: createFilterSet -}; \ No newline at end of file +};