<commit_before>var jayson = require('jayson');

// create a client
var client = jayson.client.http({
  port: 3000
});

client.request(process.argv[2], [{'foo': 'bar'}], function(err, response) {
  if(err) throw err;
  console.log(JSON.stringify(response.result)); 
});<commit_msg>Add verbose logging to the client.<commit_after>var jayson = require('jayson');
var log = require('loglevel');

// create a client
var client = jayson.client.http({
  port: 3000
});

client.on('http request', (req) => {
	log.debug("REQUEST:");
	log.debug(req);
});

client.request(process.argv[2], [{'foo': 'bar'}], function(err, response) {
  if(err) throw err;
  console.log(JSON.stringify(response.result)); 
});
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.014388489208633094, 'mean_word_length': 5.27027027027027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1582023', 'n_tokens_mistral': 251, 'n_tokens_neox': 235, 'n_words': 53}