var log = { SUCCESS : [] , FAILURE : [] , SKIPPED : [] } var statuslog = function (err, data){ if(err) log.FAILURE.push( {err, data} ) else log.SUCCESS.push(data) } module.exports = { 'log' : log , 'statuslog' : statuslog }