14 lines
261 B
JavaScript
Raw Normal View History

2021-06-29 16:27:35 +02:00
'use strict';
const { format } = require('winston');
module.exports = format(info => {
if (info instanceof Error) {
2021-07-28 15:32:21 +02:00
return Object.assign({}, info, {
message: `${info.message}${info.stack ? `\n` + info.stack : ''}`,
});
2021-06-29 16:27:35 +02:00
}
return info;
});