<commit_before>export class Logger {

  /**
   * Logging interface for the riot-view-router mixin.
   * @param {Router} router - Router for utilities to reference
   */
  constructor (router) {
    this.$router = router
    this.logs = []

    Object.defineProperty(this.$router, 'time', {
      get: function() {
        return new Date().getTime()
      }
    })
  }

  /**
   * Fetch logs, allows for filtering by type.
   * @param {string} type - Log type to filter by.
   * @returns {Array}
   */
  $get (type) {
    return this.logs.filter((log) => type ? log.type == type : true)
  }

  /**
   * Pushes provided message to log store.
   * @param {string} message - Message to log.
   */
  log (message) {
    var self = this.$router
    let time = self.time

    if (self.debugging)
      console.log(`[${new Date(time).toString()}]: "${message}"`)

    this.logs.push({ type: 'general', message, time })
  }

  /**
   * Pushes provided message to log store.
   * @param {string} message - Message to log.
   */
  warn (message) {
    var self = this.$router
    let time = self.time

    if (self.debugging)
      console.warn(`[${new Date(time).toString()}]: "${message}"`)

    this.logs.push({ type: 'warning', message, time })
  }

  /**
   * Pushes provided message to log store.
   * @param {string} message - Message to log.
   */
  error (message) {
    var self = this.$router
    let time = self.time

    if (self.debugging)
      console.error(`[${new Date(time).toString()}]: "${message}"`)

    this.logs.push({ type: 'critical', message, time })
  }

}
<commit_msg>Added riot-view-router to log templates<commit_after>export class Logger {

  /**
   * Logging interface for the riot-view-router mixin.
   * @param {Router} router - Router for utilities to reference
   */
  constructor (router) {
    this.$router = router
    this.logs = []

    Object.defineProperty(this.$router, 'time', {
      get: function() {
        return new Date().getTime()
      }
    })
  }

  /**
   * Fetch logs, allows for filtering by type.
   * @param {string} type - Log type to filter by.
   * @returns {Array}
   */
  $get (type) {
    return this.logs.filter((log) => type ? log.type == type : true)
  }

  /**
   * Pushes provided message to log store.
   * @param {string} message - Message to log.
   */
  log (message) {
    var self = this.$router
    let time = self.time

    if (self.debugging)
      console.log(`[${new Date(time).toString()}]: (riot-view-router) "${message}"`)

    this.logs.push({ type: 'general', message, time })
  }

  /**
   * Pushes provided message to log store.
   * @param {string} message - Message to log.
   */
  warn (message) {
    var self = this.$router
    let time = self.time

    if (self.debugging)
      console.warn(`[${new Date(time).toString()}]: (riot-view-router) "${message}"`)

    this.logs.push({ type: 'warning', message, time })
  }

  /**
   * Pushes provided message to log store.
   * @param {string} message - Message to log.
   */
  error (message) {
    var self = this.$router
    let time = self.time

    if (self.debugging)
      console.error(`[${new Date(time).toString()}]: (riot-view-router) "${message}"`)

    this.logs.push({ type: 'critical', message, time })
  }

}

{'fraction_non_alphanumeric': 0.16262657256827248, 'fraction_numerical': 0.0, 'mean_word_length': 2.5281385281385282, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3655717', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1035, 'n_words': 295}