<commit_before>const winston = require('winston');
require('winston-papertrail').Papertrail;
const {PAPERTRAIL_HOST, PAPERTRAIL_PORT} = process.env;

if (PAPERTRAIL_HOST && PAPERTRAIL_PORT) {
  const winstonPapertrail = new winston.transports.Papertrail({
    host: PAPERTRAIL_HOST,
    port: PAPERTRAIL_PORT,
    handleExceptions: true,
    json: true
  });

  const logger = new winston.Logger({
    transports: [winstonPapertrail],
    exitOnError: false
  });<commit_msg>Add app name as papertrail hostname.<commit_after>const winston = require('winston');
require('winston-papertrail').Papertrail;
const {name} = require('./package.json');
const {PAPERTRAIL_HOST, PAPERTRAIL_PORT} = process.env;

if (PAPERTRAIL_HOST && PAPERTRAIL_PORT) {
  const winstonPapertrail = new winston.transports.Papertrail({
    host: PAPERTRAIL_HOST,
    port: PAPERTRAIL_PORT,
    hostname: name,
    handleExceptions: true,
    json: true
  });

  const logger = new winston.Logger({
    transports: [winstonPapertrail],
    exitOnError: false
  });
{'fraction_non_alphanumeric': 0.1178743961352657, 'fraction_numerical': 0.0, 'mean_word_length': 4.886363636363637, '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': '3561960', 'n_tokens_mistral': 382, 'n_tokens_neox': 365, 'n_words': 72}