Open openainext opened 5 years ago
For the record, the object passed to a format.transform
method must hold certain metadata for some formatters to work properly - for instance, the colorizer requires that the original level
property has been "secured" in a Symbol:
const { LEVEL } = require('triple-beam');
const info = alignedWithColorsAndTime.transform({
level: 'info',
message: 'What time is the testing at?',
[LEVEL]: 'info'
});
winston
adds such metadata in its Logger.log
method for instance: see here.
I had to upgrade winston
from 3.1.0
to 3.8.1
, then it worked without this error.
error if (!Array.isArray(Colorizer.allColors[lookup])) { ^
TypeError: Cannot read property 'undefined' of undefined