<commit_before>class window.LoggerController

  @index: ->
    steroids.navigationBar.show("logger")

  @testLog: ->
    steroids.logger.log "hello"

  @testException: ->
    asdf()

  @testShowLastMessage: ->
    lastMessage = steroids.logger.messages[steroids.logger.messages.length-1]
    if lastMessage?
      alert "Last message: #{lastMessage.message}"
    else
      alert "no messages!"

  @testStartFlushing: ->
    if steroids.logger.queue.startFlushing(100)
      alert "started"
    else
      alert "not started"

  @testStopFlushing: ->
    steroids.logger.queue.stopFlushing()

  @testCircularObject: ->
    circularObj =
      a: 'b'
    circularObj.circularRef = circularObj
    circularObj.list = [ circularObj, circularObj ]

    steroids.logger.log(circularObj)<commit_msg>Use notifications in the "logger" controller<commit_after>class window.LoggerController

  @index: ->
    steroids.navigationBar.show("logger")

  @testLog: ->
    steroids.logger.log "hello"

  @testException: ->
    asdf()

  @testShowLastMessage: ->
    lastMessage = steroids.logger.messages[steroids.logger.messages.length-1]
    if lastMessage?
      notification "Last message: #{lastMessage.message}"
    else
      notification "no messages!"

  @testStartFlushing: ->
    if steroids.logger.queue.startFlushing(100)
      notification "started"
    else
      alert "not started"

  @testStopFlushing: ->
    steroids.logger.queue.stopFlushing()

  @testCircularObject: ->
    circularObj =
      a: 'b'
    circularObj.circularRef = circularObj
    circularObj.list = [ circularObj, circularObj ]

    steroids.logger.log(circularObj)
{'fraction_non_alphanumeric': 0.11477411477411477, 'fraction_numerical': 0.004884004884004884, 'mean_word_length': 3.2905759162303663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '6597692', 'n_tokens_mistral': 519, 'n_tokens_neox': 496, 'n_words': 90}