onstar2mqtt/src/logger.js

12 lines
336 B
JavaScript
Raw Normal View History

2021-06-11 03:14:00 +00:00
const winston = require('winston');
const _ = require('lodash');
const logger = winston.createLogger({
level: _.get(process, 'env.LOG_LEVEL', 'info'),
format: winston.format.simple(),
// format: winston.format.json(),
transports: [new winston.transports.Console({stderrLevels: ['error']})]
})
module.exports = logger;