// TODO: To decide and adopt to some logging utility like winston
module.exports = {
  info: function(message,context) {
    if(context) {
      console.log(message,JSON.stringify(context, null, 2));
    }
    else {
      console.log(message);
    }
    
  },
  error: function(message, error) {
    console.error(message, JSON.stringify(error, null, 2));
  }
};

// TODO: To decide and adopt to some logging utility like winston
var util = require('util');

module.exports = {
  info: function(message,context) {
    if(context) {
      console.log(message, util.format('%j', context));
    }
    else {
      console.log(message);
    }
    
  },
  error: function(message, error) {
    console.error(message, util.format('%j', error));
  }
};

Fix multi-line log output in app logs
Fix multi-line log output in app logs
