mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
19 lines
479 B
JavaScript
19 lines
479 B
JavaScript
var CordovaLogger = require('cordova-common').CordovaLogger;
|
|
|
|
module.exports = {
|
|
adjustLoggerLevel: function (opts) {
|
|
if (opts instanceof Array) {
|
|
opts.silent = opts.indexOf('--silent') !== -1;
|
|
opts.verbose = opts.indexOf('--verbose') !== -1;
|
|
}
|
|
|
|
if (opts.silent) {
|
|
CordovaLogger.get().setLevel('error');
|
|
}
|
|
|
|
if (opts.verbose) {
|
|
CordovaLogger.get().setLevel('verbose');
|
|
}
|
|
}
|
|
};
|