You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
479 B

8 years ago
  1. var CordovaLogger = require('cordova-common').CordovaLogger;
  2. module.exports = {
  3. adjustLoggerLevel: function (opts) {
  4. if (opts instanceof Array) {
  5. opts.silent = opts.indexOf('--silent') !== -1;
  6. opts.verbose = opts.indexOf('--verbose') !== -1;
  7. }
  8. if (opts.silent) {
  9. CordovaLogger.get().setLevel('error');
  10. }
  11. if (opts.verbose) {
  12. CordovaLogger.get().setLevel('verbose');
  13. }
  14. }
  15. };