<commit_before>
core = core || {};

core.DEBUG_LEVEL = {
  NO_DEBUG: 0,
  ERROR: 10,
  WARN: 20,
  LOG: 30,
  INFO: 40
}

core.debug = core.debug || core.DEBUG_LEVEL.NO_DEBUG;

core.errors = [];
core.warnings = [];
core.logs = [];
core.infos = [];

core.console_pure = window.console;

core.console = {};
core.console.error = function(message) {
  core.errors.push(message);
  if (core.debug >= core.DEBUG_LEVEL.ERROR)  {
    core.console_pure.error(message);
  }
}
core.console.warn = function(message) {
  core.warnings.push(message);
  if (core.debug >= core.DEBUG_LEVEL.WARN) {
    core.console_pure.warn(message);
  }
}
core.console.log = function(message) {
  core.logs.push(message);
  if (core.debug >= core.DEBUG_LEVEL.LOG) {
    core.console_pure.log(message);
  }
}
core.console.info = function(message) {
  core.infos.push(message);
  if (core.debug >= core.DEBUG_LEVEL.INFO) {
    core.console_pure.info(message);
  }
}

console = core.console;
window.console = console;
<commit_msg>master - added method inspection and namespace<commit_after>
core = core || {};
core.debug = core.debug || {};
core.debug.console = core.debug.console || {};

core.debug.DEBUG_LEVEL = {
  NO_DEBUG: 0,
  ERROR: 10,
  WARN: 20,
  LOG: 30,
  INFO: 40
}
core.debug.level = core.debug.level || core.debug.DEBUG_LEVEL.NO_DEBUG;

core.debug.errors = [];
core.debug.warnings = [];
core.debug.logs = [];
core.debug.infos = [];

core.debug.console_pure = window.console;


core.debug.console.error = function(message) {
  core.debug.errors.push(message);
  if (core.debug.level >= core.debug.DEBUG_LEVEL.ERROR)  {
    core.debug.console_pure.error(message);
  }
};
core.debug.console.warn = function(message) {
  core.debug.warnings.push(message);
  if (core.debug.level >= core.debug.DEBUG_LEVEL.WARN) {
    core.debug.console_pure.warn(message);
  }
};
core.debug.console.log = function(message) {
  core.debug.logs.push(message);
  if (core.debug.level >= core.debug.DEBUG_LEVEL.LOG) {
    core.debug.console_pure.log(message);
  }
};
core.debug.console.info = function(message) {
  core.debug.infos.push(message);
  if (core.debug.level >= core.debug.DEBUG_LEVEL.INFO) {
    core.debug.console_pure.info(message);
  }
};

console = core.debug.console;
window.console = console;


core.debug.print_methods = function(object) {
  console.log(Object.getOwnPropertyNames(object).filter(function (p) {
    return typeof object[p] === 'function';
  }));
};

{'fraction_non_alphanumeric': 0.17042195821384679, 'fraction_numerical': 0.007374027038099139, 'mean_word_length': 3.933333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5378156', 'n_tokens_mistral': 899, 'n_tokens_neox': 868, 'n_words': 128}