<commit_before>const bunyan = require('bunyan')
const bunyanFormat = require('bunyan-format')

const chalk = require('chalk')
chalk.enabled = true

const name = process.env.API_LOG_NAME || 'colmena'
const level = process.env.API_LOG_LEVEL || 'debug'

const streams = []

streams.push({
  level,
  stream: bunyanFormat({ outputMode: 'short' }),
})

const log = bunyan.createLogger({
  name,
  streams,
})

const colors = [
  'black',
  'red',
  'green',
  'yellow',
  'blue',
  'magenta',
  'cyan',
  'white',
  'gray',
]

colors.forEach(
  color => (log[color] = (...str) => log.info(chalk[color](...str)))
)
colors.forEach(
  color => (log[color].b = (...str) => log.info(chalk[color].bold(...str)))
)
colors.forEach(
  color => (log[color].d = (...str) => log.info(chalk[color].dim(...str)))
)

module.exports = log<commit_msg>chore(logger): format files using prettier<commit_after>const bunyan = require('bunyan')
const bunyanFormat = require('bunyan-format')

const chalk = require('chalk')
chalk.enabled = true

const name = process.env.API_LOG_NAME || 'colmena'
const level = process.env.API_LOG_LEVEL || 'debug'

const streams = []

streams.push({
  level,
  stream: bunyanFormat({ outputMode: 'short' }),
})

const log = bunyan.createLogger({
  name,
  streams,
})

const colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray']

colors.forEach(color => (log[color] = (...str) => log.info(chalk[color](...str))))
colors.forEach(color => (log[color].b = (...str) => log.info(chalk[color].bold(...str))))
colors.forEach(color => (log[color].d = (...str) => log.info(chalk[color].dim(...str))))

module.exports = log
{'fraction_non_alphanumeric': 0.21644498186215236, 'fraction_numerical': 0.0, 'mean_word_length': 4.426229508196721, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '6505693', 'n_tokens_mistral': 614, 'n_tokens_neox': 606, 'n_words': 120}