Closed jd-carroll closed 1 year ago
The meta object can contain valuable information for the printed log format (such as the authenticated user), but it not used in the template process. The template functions should each be updated to the following:
meta
exports.errorLogger = function errorLogger(options) { // ... options.winstonInstance.log({ level, message: getTemplate(options.msg, {err: err, req: req, res: res, meta: exceptionMeta}), meta: exceptionMeta }); // ... }; exports.logger = function logger(options) { // ... var msg = template({req: req, res: _.assign({}, res, coloredRes), meta}); // ... };
The
meta
object can contain valuable information for the printed log format (such as the authenticated user), but it not used in the template process. The template functions should each be updated to the following: