<commit_before>import 'newrelic'
import http from 'http'
import express from 'express'
import winston from 'winston'
import expressWinston from 'express-winston'
import cors from 'cors'
import compression from 'compression'
import helmet from 'helmet'
import hpp from 'hpp'
import throng from 'throng'
import Raven from 'raven'
import dotenv from 'dotenv'
import path from 'path'
import aws from 'aws-sdk'
import pg from 'pg'
import EventEmitter from 'events'
import _ from 'lodash'
import fs from 'fs'
import os from 'os'
import crypto from 'crypto'
import WinstonCloudwatch from 'winston-cloudwatch'
import { URL } from 'url'

dotenv.config({ path: path.resolve(__dirname, '..', '.env') })

const startTime = new Date().toISOString()

const winstonTransport = ({ nodeEnv, accessKeyId, secretAccessKey }) => {
  if (nodeEnv === 'production') {
    return new WinstonCloudwatch({
      accessKeyId,
      secretAccessKey,
      logGroupName: 'vivos-em-nos-production',
      logStreamName: () => {
        // Spread log streams across dates as the server stays up
        let date = new Date().toISOString().split('T')[0];
        return 'express-server-' + date + '-' +
          crypto.createHash('md5')
          .update(startTime)
          .digest('hex');
      },
      awsRegion: 'us-west-1',
      jsonMessage: true,<commit_msg>Add ping to ignored routes in log<commit_after>import 'newrelic'
import http from 'http'
import express from 'express'
import winston from 'winston'
import expressWinston from 'express-winston'
import cors from 'cors'
import compression from 'compression'
import helmet from 'helmet'
import hpp from 'hpp'
import throng from 'throng'
import Raven from 'raven'
import dotenv from 'dotenv'
import path from 'path'
import aws from 'aws-sdk'
import pg from 'pg'
import EventEmitter from 'events'
import _ from 'lodash'
import fs from 'fs'
import os from 'os'
import crypto from 'crypto'
import WinstonCloudwatch from 'winston-cloudwatch'
import { URL } from 'url'

dotenv.config({ path: path.resolve(__dirname, '..', '.env') })

const startTime = new Date().toISOString()

const winstonTransport = ({ nodeEnv, accessKeyId, secretAccessKey }) => {
  if (nodeEnv === 'production') {
    return new WinstonCloudwatch({
      accessKeyId,
      secretAccessKey,
      logGroupName: 'vivos-em-nos-production',
      logStreamName: () => {
        // Spread log streams across dates as the server stays up
        let date = new Date().toISOString().split('T')[0];
        return 'express-server-' + date + '-' +
          crypto.createHash('md5')
          .update(startTime)
          .digest('hex');
      },
      awsRegion: 'us-west-1',
      jsonMessage: true,
      ignoredRoutes: ['/ping'],
{'fraction_non_alphanumeric': 0.12077826725403817, 'fraction_numerical': 0.0022026431718061676, 'mean_word_length': 3.666095890410959, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '600051', 'n_tokens_mistral': 834, 'n_tokens_neox': 809, 'n_words': 273}