fix: winston usages

This commit is contained in:
Barış Soner Uşaklı
2020-11-26 13:56:34 -05:00
parent 414caac01b
commit b8cafefce2
10 changed files with 24 additions and 8 deletions

View File

@@ -13,6 +13,20 @@ function setupWinston() {
return;
}
// allow winton.error to log error objects properly
// https://github.com/NodeBB/NodeBB/issues/6848
// const winstonError = winston.error;
// winston.error = function (msg, error) {
// if (msg instanceof Error) {
// winstonError(msg);
// } else if (error instanceof Error) {
// msg = msg + '\n' + error.stack;
// winstonError(msg);
// } else {
// winstonError.apply(null, arguments);
// }
// };
var formats = [];
if (nconf.get('log-colorize') !== 'false') {
formats.push(winston.format.colorize());