Open andrew-aladev opened 7 years ago
We are using custom transport for winston. It can will receive message and meta arguments.
winston
message
meta
logger.debug('fit'); // -> message = 'fit'; meta = {}; logger.debug(new Error('fit')); // -> message = ''; meta = new Error('fit'); logger.debug(new Error('fit'), { a : 1 }); // -> message = new Error('fit').toString(); meta = { a : 1 };
This looks looks like a bug, but this is a feature. exports.log function is full of such "features".
exports.log
winston looks unreliable, we want to find a good alternative for it.
Now would not be the best time to switch loggers if we can avoid it. Can we patch this to detect when we are getting an Error object and toString it?
Yes, we've patched and merged it. This is a part of branch.
We are using custom transport for
winston
. It can will receivemessage
andmeta
arguments.This looks looks like a bug, but this is a feature.
exports.log
function is full of such "features".winston
looks unreliable, we want to find a good alternative for it.