<commit_before>const Joi = require('joi')
const Os = require('os')
const Util = require('./util')

module.exports = Joi.object().keys({
  // Max execution time of a request
  timeout: Joi.number()
    .integer()
    .default(2000),
  tag: Joi.string().default(''),
  // Enables pretty log formatter in Pino default logger
  prettyLog: Joi.boolean().default(true),
  // The name of the instance
  name: Joi.string().default(`hemera-${Os.hostname()}-${Util.randomId()}`),
  // Should gracefully exit the process at unhandled exceptions or fatal errors
  crashOnFatal: Joi.boolean().default(true),
  logLevel: Joi.any()
    .valid(['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'])
    .default('silent'),
  // Create a child logger per section / plugin. Only possible with default logger Pino.
  childLogger: Joi.boolean().default(false),
  // Max recursive method calls
  maxRecursion: Joi.number()
    .integer()
    .default(0),
  // Custom logger
  logger: Joi.object().optional(),
  // The error serialization options
  errio: Joi.object()
    .keys({
      // Recursively serialize and deserialize nested errors
      recursive: Joi.boolean().default(true),
      // Include inherited properties
      inherited: Joi.boolean().default(true),
      // Include stack property
      stack: Joi.boolean().default(true),
      // Include properties with leading or trailing underscores<commit_msg>change loglevel with env variable<commit_after>const Joi = require('joi')
const Os = require('os')
const Util = require('./util')

module.exports = Joi.object().keys({
  // Max execution time of a request
  timeout: Joi.number()
    .integer()
    .default(2000),
  tag: Joi.string().default(''),
  // Enables pretty log formatter in Pino default logger
  prettyLog: Joi.boolean().default(true),
  // The name of the instance
  name: Joi.string().default(`hemera-${Os.hostname()}-${Util.randomId()}`),
  // Should gracefully exit the process at unhandled exceptions or fatal errors
  crashOnFatal: Joi.boolean().default(true),
  logLevel: Joi.any()
    .valid(['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'])
    .default(process.env.LOG_LEVEL || 'silent'),
  // Create a child logger per section / plugin. Only possible with default logger Pino.
  childLogger: Joi.boolean().default(false),
  // Max recursive method calls
  maxRecursion: Joi.number()
    .integer()
    .default(0),
  // Custom logger
  logger: Joi.object().optional(),
  // The error serialization options
  errio: Joi.object()
    .keys({
      // Recursively serialize and deserialize nested errors
      recursive: Joi.boolean().default(true),
      // Include inherited properties
      inherited: Joi.boolean().default(true),
      // Include stack property
      stack: Joi.boolean().default(true),
      // Include properties with leading or trailing underscores
{'fraction_non_alphanumeric': 0.14739783443939924, 'fraction_numerical': 0.0034928396786587496, 'mean_word_length': 3.5532591414944354, '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': '4805353', 'n_tokens_mistral': 853, 'n_tokens_neox': 838, 'n_words': 248}