<commit_before>'use strict'

const path = require('path')
const bunyan = require('bunyan')

const isRunningTests = process.env.npm_lifecycle_event === 'test'
const stdoutLevel = isRunningTests ? 'FATAL' : 'INFO'

const daysToKeepLogs = process.env.KEEP_LOGS || 10

module.exports = bunyan.createLogger({
  name: 'bot',
  streams: [
    {
      stream: process.stdout,
      level: stdoutLevel
    },
    {
      type: 'rotating-file',
      path: path.join(__dirname, '../logs/bot.log'),
      period: '1d', // daily rotation
      count: daysToKeepLogs
    }
  ]
})
<commit_msg>Set file log level from INFO -> DEBUG<commit_after>'use strict'

const path = require('path')
const bunyan = require('bunyan')

const isRunningTests = process.env.npm_lifecycle_event === 'test'
const stdoutLevel = isRunningTests ? 'FATAL' : 'INFO'

const daysToKeepLogs = process.env.KEEP_LOGS || 10

module.exports = bunyan.createLogger({
  name: 'bot',
  streams: [
    {
      stream: process.stdout,
      level: stdoutLevel
    },
    {
      type: 'rotating-file',
      path: path.join(__dirname, '../logs/bot.log'),
      period: '1d', // daily rotation
      count: daysToKeepLogs,
      level: 'debug'
    }
  ]
})

{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.0049833887043189366, 'mean_word_length': 3.140893470790378, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5645063', 'n_tokens_mistral': 416, 'n_tokens_neox': 407, 'n_words': 90}