How to use the trace function from loglevel
Find comprehensive JavaScript loglevel.trace code examples handpicked from public code repositorys.
38 39 40 41 42 43 44 45 46 47
/** * @param {boolean} [ignoreStderr] * @returns {string} */ build(ignoreStderr) { log.trace('build()', this); let cmd = this.cmd; for (const arg of this.args) { cmd += ' ' + arg; }
114
466
5
+ 15 other calls in file
GitHub: sbs20/scanservjs
100 101 102 103 104 105 106 107 108
if ('--ald' in features) { this.params.ald = data.params.ald || features['--ald'].default; assertContains(features['--ald'].options, this.params.ald, 'Invalid --ald'); } log.trace(LogFormatter.format().full(this)); } };
113
463
5
+ 4 other calls in file
1 2 3 4 5 6 7 8 9 10 11 12 13
const loglevel = require('loglevel'); loglevel.setLevel(parseInt(process.env.LOG_LEVEL || 0)); const trace = loglevel.trace; const debug = loglevel.debug; const info = loglevel.info; const warn = loglevel.warn; const error = loglevel.error;
0
1
2
3 4 5 6 7 8 9 10 11 12 13
(async () => { try { log.setLevel(0) log.trace('trace') log.debug('debug') log.info('info') log.warn('warn', 'kjhgfbdcxz') log.error('error')
0
1
0
GitHub: PHaroZ/rika-mqtt
29 30 31 32 33 34 35 36 37 38
const fetchStoveStatus = async (args) => { const {conf, stove, mqtt} = args let status try { status = await stove.getStatus() log.trace(status) } catch (e) { log.warn('fail to get status') log.warn(e) }
0
0
0
loglevel.debug is the most popular function in loglevel (1470 examples)