<commit_before>var levels = ['log', 'debug', 'info', 'notice', 'warn', 'error'];
var Logger = function () {
  this.loglevel = 0;
  this.excludes = [];
  var self = this;
  for (var key in levels) {
    this.createFunction(key);
  }
};
Logger.prototype.createFunction = function (key) {
  var self = this;
  this[levels[key]] = function (str) {
    if (self.excludes.indexOf(levels[key]) === -1) {
      var l = levels[key].toUpperCase();
      var strDate = new Date().toISOString().substr(0, 19).replace('T', ' ');
        console.log(strDate + " [" + l + "] ", str);
    }
  }
}
Logger.prototype.setLevel = function (level) {
  if (typeof level === "string") {
    for (var i = levels.indexOf(level) - 1; i >= 0; i--) {
      this.excludes.push(levels[i]);
    }
  }
};

module.exports = new Logger();<commit_msg>with multiple arguments<commit_after>var levels = ['log', 'debug', 'info', 'notice', 'warn', 'error'];
var Logger = function () {
  this.loglevel = 0;
  this.excludes = [];
  var self = this;
  for (var key in levels) {
    this.createFunction(key);
  }
};
Logger.prototype.createFunction = function (key) {
  var self = this;
  this[levels[key]] = function (str) {
    if (self.excludes.indexOf(levels[key]) === -1) {
      var ar = Array.prototype.slice.call(arguments);
      var l = levels[key].toUpperCase();
      var strDate = self.formatDate(new Date);
      ar.unshift("[" + l + "]");
      ar.unshift(strDate);
      console.log.apply(console, ar);
    }
  }
}
Logger.prototype.setLevel = function (level) {
  if (typeof level === "string") {
    for (var i = levels.indexOf(level) - 1; i >= 0; i--) {
      this.excludes.push(levels[i]);
    }
  }
};
Logger.prototype.formatDate = function (d) {
  function pad(n) {
    return n < 10 ? '0' + n : n;
  }
  return d.getFullYear() + '-' +
          pad(d.getMonth() + 1) + '-' +
          pad(d.getDate()) + ' ' +
          pad(d.getHours()) + ':' +
          pad(d.getMinutes()) + ':' +
          pad(d.getSeconds());
};

module.exports = new Logger();
{'fraction_non_alphanumeric': 0.19842053307008883, 'fraction_numerical': 0.007403751233958539, 'mean_word_length': 2.817325800376648, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '3323623', 'n_tokens_mistral': 728, 'n_tokens_neox': 706, 'n_words': 154}