When logging an object with the human formatter, I see that the output is different in nested object keys and values, vs. root ones:
keys are quoted in nested objects, and not quoted in the root
string are not quoted if they're values of root fields
empty arrays are not logged if they're values of root fields
import log from 'bristol';
log.addTarget('console').withFormatter('human');
const object = {
rootString: 'key name not quoted, string should be quoted',
nested: {
string: 'string is quoted, and so is the key',
array: [], // empty array correctly logged
},
array: [], // nothing logged
};
log.info('Unquoted strings', object);
Output:
[2019-05-26 00:30:47] INFO: Inconsistent output (file:///.../bristol.mjs:13)
rootString: key name not quoted, string should be quoted
nested:
{
"string": "string is quoted, and so is the key",
"array": []
}
array:
When logging an object with the human formatter, I see that the output is different in nested object keys and values, vs. root ones:
Output: