Open DaxChen opened 5 years ago
when logging structured data, for example:
log.warn({ foo: 123 });
It shows as:
logs: [{message: "test warn [object Object]", level: "warn", logger: "",…}]
console shows normal though.
Can you call JSON.stringify on either each argument or the whole args? Or even let users define format function? (current format function gets "[object Object]" already...)
args
log.warn('%o', { foo: 123 });
or
log.warn('%j', { foo: 123 });
when logging structured data, for example:
It shows as:
console shows normal though.
Can you call JSON.stringify on either each argument or the whole
args
? Or even let users define format function? (current format function gets "[object Object]" already...)