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

let config;

if (process.env.NODE_ENV === "local") {
  config = require('../config/local.json');
} else {
  config = require('../config/prod.json');
}

module.exports = {
  logInfo: function(service, endpoint, request, response_status, response_body) {
    var body = {
      service: service,
      endpoint: endpoint,
      request_body: request.body,
      user_agent: request.headers['user-agent'],
      response_code: response_status,
      response_body: response_body
    }

    var options = {
      host: config.hostnames.log.domain,
      port: config.hostnames.log.port,
      path: '/logger/log',
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',<commit_msg>make common.js log to port 80 in prod<commit_after>var http = require('http');

let config;
let port;

if (process.env.NODE_ENV === "local") {
  port = config.hostnames.log.port;
  config = require('../config/local.json');
} else {
  port = 80;
  config = require('../config/prod.json');
}

module.exports = {
  logInfo: function(service, endpoint, request, response_status, response_body) {
    var body = {
      service: service,
      endpoint: endpoint,
      request_body: request.body,
      user_agent: request.headers['user-agent'],
      response_code: response_status,
      response_body: response_body
    }

    var options = {
      host: config.hostnames.log.domain,
      port: port,
      path: '/logger/log',
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
{'fraction_non_alphanumeric': 0.14377406931964057, 'fraction_numerical': 0.0025673940949935813, 'mean_word_length': 2.9872122762148337, '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': '3168366', 'n_tokens_mistral': 484, 'n_tokens_neox': 477, 'n_words': 106}