var gith = require('gith').create(9001);

var execFile = require('child_process').execFile;

gith({repo: 'eolhing/website'}).on('all', function(payload)
{
    if(payload.branch === 'master')
    {
		execFile('hook.sh', function(error, stdout, stderr)
		{
				console.log('exec complete');
		});
    }
});
@@ -33,16 +33,50 @@
 e(9001);
+%0Avar winston = require('winston');
 %0A%0Avar ex
@@ -120,16 +120,125 @@
 cFile;%0A%0A
+%0Awinston.add(winston.transports.File, %7B filename: 'tmp.log' %7D);%0Awinston.remove(winston.transports.Console);%0A%0A
 gith(%7Bre
@@ -291,16 +291,39 @@
 load)%0A%7B%0A
+%09winston.info(%22repo%22);%0A
     if(p
@@ -356,16 +356,42 @@
 )%0A    %7B%0A
+%09%09winston.info(%22branch%22);%0A
 %09%09execFi
@@ -440,16 +440,42 @@
 rr)%0A%09%09%7B%0A
+%09%09%09%09winston.info(%22exec%22);%0A
 %09%09%09%09cons
@@ -512,11 +512,12 @@
 ;%0A    %7D%0A
-
 %7D);
+%0A

Add log in hook script