How to use the log function from npmlog
Find comprehensive JavaScript npmlog.log code examples handpicked from public code repositorys.
GitHub: Mondego/pyreco

247 248 249 250 251 252 253 254 255 256
## log.resume() Emit all buffered messages that were written while paused. ## log.log(level, prefix, message, ...) * `level` {String} The level to emit the message at * `prefix` {String} A string prefix. Set to "" to skip. * `message...` Arguments to `util.format`
+ 9 other calls in file
GitHub: AdStage/testem

127 128 129 130 131 132 133 134 135 136
} this.setErrorPopupMessage(title); if (err) { log.log('warn', titleText); } else { log.log('warn', titleText, { name: err.name, message: err.message
+ 3 other calls in file
GitHub: franciscop/server

39 40 41 42 43 44 45 46 47 48
ctx.options.log.report && typeof ctx.options.log.report === 'function' ) { ctx.options.log.report(content, type); } log.log(type, '', content); }; }); } };
73 74 75 76 77 78 79 80 81 82
npmlog.log(lvl, clientId, '| Date/Time :-', moment().format('ddd MMMM DD YYYY HH:mm:ss.SSS Z')); npmlog.log(lvl, clientId, '| Host Name :-', os.hostname()); npmlog.log(lvl, clientId, '| Operating System :-', os.type(), os.release()); npmlog.log(lvl, clientId, '| Architecture :-', os.platform(), os.arch()); npmlog.log(lvl, clientId, '| Node Version :-', process.version); npmlog.log(lvl, clientId, '| Node Path :-', process.execPath); npmlog.log(lvl, clientId, '| Node Arguments :-', process.execArgs);
+ 51 other calls in file
0 1 2 3 4 5 6 7 8 9 10 11 12 13
const NPMLOG = require('npmlog') const { LEVELS } = require('proc-log') const npmEmitLog = NPMLOG.emitLog.bind(NPMLOG) const npmLog = NPMLOG.log.bind(NPMLOG) const merge = (...objs) => objs.reduce((acc, obj) => ({ ...acc, ...obj })) const mockLogs = (otherMocks = {}) => {
+ 3 other calls in file
GitHub: Tencent/wepy

31 32 33 34 35 36 37 38 39 40
args.forEach( (arg, i) => typeof arg === 'object' && arg instanceof Error && arg.stack && arg.message && (args[i] = arg.message) ); } log.log.apply(log, [v].concat(args)); }; }); mylog.level = v => (v ? (log.level = v) : log.level);
+ 11 other calls in file
npmlog.verbose is the most popular function in npmlog (7425 examples)