source: frontend/node_modules/jake/lib/utils/logger.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 505 bytes
RevLine 
[9af201e]1let util = require('util');
2
3let logger = new (function () {
4 let _output = function (type, out) {
5 let quiet = typeof jake != 'undefined' && jake.program &&
6 jake.program.opts && jake.program.opts.quiet;
7 let msg;
8 if (!quiet) {
9 msg = typeof out == 'string' ? out : util.inspect(out);
10 console[type](msg);
11 }
12 };
13
14 this.log = function (out) {
15 _output('log', out);
16 };
17
18 this.error = function (out) {
19 _output('error', out);
20 };
21
22})();
23
24module.exports = logger;
Note: See TracBrowser for help on using the repository browser.