<commit_before><commit_msg>create logger library<commit_after>/**
 * @fileOverview Provides a Bunyan logger.
 */
const bunyan = require('bunyan');

/**
 * Create a singleton bunyan logger and expose it.
 */
const logger = module.exports = bunyan.createLogger({
  name: 'KafkaAvro',
  level: 'info',
});

/**
 * Get a child logger with a relative path to the provided full module path.
 *
 * Usage: const log = require('./util/logger').getChild(__filename);
 *
 * @param {string} modulePath The full modulepath.
 * @return {bunyan.Child} A child logger to use.
 */
logger.getChild = function(modulePath) {
  let cleanModulePath = modulePath.split('kafka-avro').pop();

  return logger.child({module: cleanModulePath});
};
{'fraction_non_alphanumeric': 0.14305555555555555, 'fraction_numerical': 0.0, 'mean_word_length': 4.421052631578948, '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': '5953794', 'n_tokens_mistral': 223, 'n_tokens_neox': 216, 'n_words': 66}