<commit_before>color = require 'ansi-color'
growl = require 'growl'
require 'date-utils'

colors =
  error: 'red'
  warn: 'yellow'
  info: 'green'
  debug: 'blue'

getInfo = (level) ->
  date = new Date().toFormat('DD MMM HH:MM:SS')
  lvl = color.set level, colors[level]
  "#{date} - #{lvl}:"

logger =
  isDebug: process.env.BRUNCH_DEBUG is '1'

  log: (level, args...) ->
    info = getInfo level
    process.nextTick ->
      if level is 'error' or level is 'warn'
        console.error info, args...
      else
        console.log info, args...

  error: ->
    growl [arguments...].join(' '), title: 'Brunch error'
    @log 'error', arguments...

  warn: ->
    @log 'warn', arguments...

  info: ->
    @log 'info', arguments...

  debug: ->
    if @isDebug
      @log 'debug', arguments...

module.exports = Object.freeze(logger)
<commit_msg>Fix incorrect date in logger.<commit_after>color = require 'ansi-color'
growl = require 'growl'
require 'date-utils'

colors =
  error: 'red'
  warn: 'yellow'
  info: 'green'
  debug: 'blue'

getInfo = (level) ->
  date = new Date().toFormat('DD MMM HH24:MI:SS')
  lvl = color.set level, colors[level]
  "#{date} - #{lvl}:"

logger =
  isDebug: process.env.BRUNCH_DEBUG is '1'

  log: (level, args...) ->
    info = getInfo level
    process.nextTick ->
      if level is 'error' or level is 'warn'
        console.error info, args...
      else
        console.log info, args...

  error: ->
    growl [arguments...].join(' '), title: 'Brunch error'
    @log 'error', arguments...

  warn: ->
    @log 'warn', arguments...

  info: ->
    @log 'info', arguments...

  debug: ->
    if @isDebug
      @log 'debug', arguments...

module.exports = Object.freeze(logger)

{'fraction_non_alphanumeric': 0.1740395809080326, 'fraction_numerical': 0.002328288707799767, 'mean_word_length': 2.5225409836065573, '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': '7613977', 'n_tokens_mistral': 611, 'n_tokens_neox': 597, 'n_words': 168}