/var/www/greso.tech/server/nsm/node_modules/logform
NameSizeModeActions
dist/-0755rm
examples/-0755rm
node_modules/-0755rm
.babelrc420644editdlrm
.eslintrc1050644editdlrm
.gitattributes260644editdlrm
align.js3670644editdlrm
browser.js17640644editdlrm
CHANGELOG.md105330644editdlrm
cli.js12160644editdlrm
colorize.js30380644editdlrm
combine.js18010644editdlrm
errors.js12160644editdlrm
format.js11680644editdlrm
index.d.ts61340644editdlrm
index.js18730644editdlrm
json.js9830644editdlrm
label.js4690644editdlrm
levels.js2510644editdlrm
LICENSE11130644editdlrm
logstash.js7590644editdlrm
metadata.js13270644editdlrm
ms.js4300644editdlrm
package.json14320644editdlrm
pad-levels.js28800644editdlrm
pretty-print.js8990644editdlrm
printf.js5150644editdlrm
README.md187390644editdlrm
simple.js9790644editdlrm
splat.js42710644editdlrm
timestamp.js7570644editdlrm
tsconfig.json4060644editdlrm
uncolorize.js7050644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/logform/logstash.js (759B)
'use strict'; const format = require('./format'); const { MESSAGE } = require('triple-beam'); const jsonStringify = require('safe-stable-stringify'); /* * function logstash (info) * Returns a new instance of the LogStash Format that turns a * log `info` object into pure JSON with the appropriate logstash * options. This was previously exposed as { logstash: true } * to transports in `winston < 3.0.0`. */ module.exports = format(info => { const logstash = {}; if (info.message) { logstash['@message'] = info.message; delete info.message; } if (info.timestamp) { logstash['@timestamp'] = info.timestamp; delete info.timestamp; } logstash['@fields'] = info; info[MESSAGE] = jsonStringify(logstash); return info; });