diff --git a/lib/index.js b/lib/index.js index e5aba32..8f2578a 100755 --- a/lib/index.js +++ b/lib/index.js @@ -1,8 +1,19 @@ #!/usr/bin/env node -/* eslint-disable import/newline-after-import */ -import logger from 'winston'; import { createBots } from './helpers'; +const winston = require('winston'); + +/* [REFACTOR] Do not hard code log file path. */ + +const logger = winston.createLogger({ + level: 'info', + format: winston.format.json(), + transports: [ + new winston.transports.Console(), + new winston.transports.File({ filename: '/var/log/slack_irc' }) + ] +}); + /* istanbul ignore next */ if (process.env.NODE_ENV === 'development') { logger.level = 'debug';