UNPKG

@mindpath/logger

Version:

Custom logging module to print logs on console, file or sent it to logs visualization application such as grafana

28 lines 890 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.providerFormat = void 0; const winston_1 = require("winston"); const utils_1 = require("../utils"); exports.providerFormat = winston_1.format((info) => { try { if (info.message instanceof Error) { info.message = Object.assign({ message: info.message.message, stack: info.message.stack, }, info.message); } if (info instanceof Error) { info = Object.assign({ message: info.message, stack: info.stack, }, info); } info.message = utils_1.stringifyMessage(info.message); return info; } catch (error) { console.log('Error in enumerateErrorFormat', error); return error; } }); //# sourceMappingURL=providerFormat.js.map