mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
17 lines
392 B
JavaScript
17 lines
392 B
JavaScript
const chalk = require('chalk');
|
|
const log = require('./log');
|
|
|
|
module.exports = msg => {
|
|
const parsedMsg = JSON.parse(msg);
|
|
const prettifiedData = JSON.stringify(parsedMsg.data, null, 2).replace(
|
|
new RegExp('\\n', 'g'),
|
|
'\n | '
|
|
);
|
|
|
|
log(
|
|
chalk.blue(
|
|
` Event Gateway | ${parsedMsg.message.trim()}\n | ${prettifiedData}`
|
|
)
|
|
);
|
|
};
|