serverless/lib/utils/log/fileLog.js
Mariusz Nowak 4944f471b1
Prettify
2019-06-26 12:43:01 +02:00

14 lines
381 B
JavaScript

'use strict';
const _ = require('lodash');
const fs = require('fs');
const path = require('path');
const fileLog = function(...args) {
// TODO BRN: This does not guarentee order, is not multi process safe,
// TODO BRN: and is not guarenteed to complete before exit.
fs.appendFileSync(path.join(process.cwd(), 'sls.log'), `${_.join(args)}\n`);
};
module.exports = fileLog;