var argv = require('minimist')(process.argv.slice(2));
var config = require('./app/config');
var ChannelMonitor = require('./app/slack').ChannelMonitor;


if (require.main === module) {
    main();
}


function main() {
    var configFilePath = argv.c;
    if (!configFilePath) {
        console.log('Config file path must be provided with the -c argument');
        process.exit(1);
    }

    var appConfig = config.fromFile(configFilePath);

    var bot = new ChannelMonitor(appConfig.token, appConfig.channels, appConfig.targetString);

    bot.on('error', function (err) {
        console.log('Bot error!');
        console.log(err);
        process.exit(5);
    });

    bot.on('ready', function () {
        console.log('Bot connected!');
    });

    bot.on('leftChannel', function (channel) {
        console.log('Left channel: ' + channel);
    });

    bot.run();
}

@@ -48,16 +48,96 @@
 ce(2));%0A
+var bunyan = require('bunyan');%0Avar log = bunyan.createLogger(%7Bname: 'seeya'%7D);%0A
 var conf
@@ -162,24 +162,24 @@
 p/config');%0A
-
 var ChannelM
@@ -361,27 +361,24 @@
         
-console.log
+log.info
 ('Config
@@ -652,35 +652,32 @@
 ) %7B%0A        
-console.log
+log.info
 ('Bot error!
@@ -688,27 +688,24 @@
         
-console.log
+log.info
 (err);%0A 
@@ -779,27 +779,24 @@
         
-console.log
+log.info
 ('Bot co
@@ -875,19 +875,16 @@
     
-console.log
+log.info
 ('Le

Add logging to main