How to use the colorConsole function from tracer
Find comprehensive JavaScript tracer.colorConsole code examples handpicked from public code repositorys.
GitHub: sessionboy/sinn-server
3 4 5 6 7 8 9 10 11 12
* @ website http://sinn.boyagirl.com * @ use 统一try catch处理中间件 * @ 用于捕获内部错误,输出日志信息 */ const tracer = require('tracer'); const logger = tracer.colorConsole({ level: 'error', format: '{{timestamp}} <{{title}}> {{file}}(#{{line}}): {{message}}', file: 'error.log', path: __dirname
42
231
8
GitHub: lyc458216/Asch-fork
158 159 160 161 162 163 164 165 166 167
maxLogFiles: 10, allLogsFileName: 'debug', dateformat: 'yyyy-mm-dd HH:MM:ss.L' }) } else { logger = tracer.colorConsole({ dateformat: 'yyyy-mm-dd HH:MM:ss.L' }) } tracer.setLevel(appConfig.logLevel) const options = {
0
0
0
GitHub: pooreumu/logging
24 25 26 27 28 29 30 31 32 33 34 35
// const fs = require('fs') // const tracer = require('tracer') // const rTracer = require('cls-rtracer') // const logger = tracer.colorConsole({ // format: [ // '{{timestamp}} <{{title}}> ({{file}}:{{line}}) {{message}}', // default format // { // error: '{{timestamp}} <{{title}}> ({{file}}:{{line}}) {{message}}\nCall Stack:\n{{stack}}', // error format
0
0
0
tracer.debug is the most popular function in tracer (235 examples)