Urara-Blog/node_modules/.pnpm-store/v3/files/0c/f240f3e4f4151ba9df8175b9a5673982a2c7d7aa528b6ecfde91c0f00322723cd70c59b735ab5f1fcabc98921a4714ef7626167fb3577a6416921405981f72
2022-08-14 01:14:53 +08:00

24 lines
505 B
Text

let util = require('util');
let logger = new (function () {
let _output = function (type, out) {
let quiet = typeof jake != 'undefined' && jake.program &&
jake.program.opts && jake.program.opts.quiet;
let msg;
if (!quiet) {
msg = typeof out == 'string' ? out : util.inspect(out);
console[type](msg);
}
};
this.log = function (out) {
_output('log', out);
};
this.error = function (out) {
_output('error', out);
};
})();
module.exports = logger;