<commit_before>'use strict';

var logObject = {};
['log', 'debug', 'warn'].forEach(function (level) {
  var levelExists = global.console && global.console[level] && global.console[level].apply;
  logObject[level] = levelExists ? function () {
    return global.console[level].apply(global.console, arguments);
  } : (level === 'log' ? function () {} : logObject.log);
});

module.exports = logObject;<commit_msg>added fix for old browsers such as IE7/8 were console.log does not have an apply function. using try catch we are take care that everything works. tested on IE8.<commit_after>'use strict';

var logObject = {};
['log', 'debug', 'warn'].forEach(function (level) {
    var levelExists;
    try {
        levelExists = global.console && global.console[level] && global.console[level].apply;
    } catch(e){}

  logObject[level] = levelExists ? function () {
    return global.console[level].apply(global.console, arguments);
  } : (level === 'log' ? function () {} : logObject.log);

});

module.exports = logObject;
{'fraction_non_alphanumeric': 0.1640625, 'fraction_numerical': 0.0029296875, 'mean_word_length': 4.423280423280423, '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': '60885', 'n_tokens_mistral': 301, 'n_tokens_neox': 297, 'n_words': 80}