<commit_before>// 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));
  }
};<commit_msg>Fix multi-line log output in app logs<commit_after>// 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));
  }
};
{'fraction_non_alphanumeric': 0.14476885644768855, 'fraction_numerical': 0.0024330900243309003, 'mean_word_length': 3.2422680412371134, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4472466', 'n_tokens_mistral': 260, 'n_tokens_neox': 257, 'n_words': 64}