<commit_before>/**
 * This file sets up the logging system and also sets up the
 * external logs system if enabled in the config.
 *
 * The log module will be called by the whole application a lot
 * during its lifetime and is expected to implement the following methods:
 * child(), trace(), debug(), info(), warn(), error(), fatal(), flushQueue().
 */

let bunyan = require("bunyan");
let streams = [{
  level: "debug",
  stream: process.stdout,
}];
let externalSystem;

let reqSerializer = (req) => {
  var filteredReq = {
    method: req.method,
    url: req.url,
    ip: req.ip,
  };
  return filteredReq;
};

let logger = bunyan.createLogger({
  name: "prochains-trains-ratp",
  streams: streams,
  serializers: {
    req: reqSerializer,
    res: bunyan.stdSerializers.res,
    err: bunyan.stdSerializers.err,
  },
});

logger.flushQueue = () => {
  if (externalSystem) {
    externalSystem.flushQueue();
  }
};

module.exports = logger;<commit_msg>Rename log app name<commit_after>/**
 * This file sets up the logging system and also sets up the
 * external logs system if enabled in the config.
 *
 * The log module will be called by the whole application a lot
 * during its lifetime and is expected to implement the following methods:
 * child(), trace(), debug(), info(), warn(), error(), fatal(), flushQueue().
 */

let bunyan = require("bunyan");
let streams = [{
  level: "debug",
  stream: process.stdout,
}];
let externalSystem;

let reqSerializer = (req) => {
  var filteredReq = {
    method: req.method,
    url: req.url,
    ip: req.ip,
  };
  return filteredReq;
};

let logger = bunyan.createLogger({
  name: "ratp-api",
  streams: streams,
  serializers: {
    req: reqSerializer,
    res: bunyan.stdSerializers.res,
    err: bunyan.stdSerializers.err,
  },
});

logger.flushQueue = () => {
  if (externalSystem) {
    externalSystem.flushQueue();
  }
};

module.exports = logger;
{'fraction_non_alphanumeric': 0.1371518654755649, 'fraction_numerical': 0.0, 'mean_word_length': 3.610169491525424, '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': '6209563', 'n_tokens_mistral': 594, 'n_tokens_neox': 585, 'n_words': 194}