Is it possible to show objects (also metadata objects) colored like inspect does? See my example:
const inspect = require('util').inspect;
const bunyan = require('bunyan');
const bunyanDebugStream = require('bunyan-debug-stream');
var logger = bunyan.createLogger({
name: 'xxx',
streams: [{
level: 'debug',
type: 'raw',
stream: bunyanDebugStream({
basepath: __dirname,
useColor: true,
showLoggerName: false,
showProcess: false,
showPid: false,
showLevel: true,
showMetadata: true
})
}],
});
const foo = {
aaa: 'uvw',
bbb: 4711,
ccc: true,
ddd: [9,8,7,6]
}
const inspectOpts = {
depth:null, colors:true, maxArrayLength:255, breakLength:60, compact:true
}
console.log(inspect(foo, inspectOpts));
logger.info(foo);
Thanks in advance.
Is it possible to show objects (also metadata objects) colored like inspect does? See my example:
Thanks in advance.