<commit_before>package cbt
import java.time._
// We can replace this with something more sophisticated eventually
case class Logger(enabledLoggers: Set[String]){
  val start = LocalTime.now()
  //System.err.println("Created Logger("+enabledLoggers+")")
  def this(enabledLoggers: Option[String]) = this( enabledLoggers.toVector.flatMap( _.split(",") ).toSet )
  def log(name: String, msg: => String) = {
    val timeTaken = (Duration.between(start, LocalTime.now()).toMillis.toDouble / 1000).toString
    System.err.println( s"[${" "*(6-timeTaken.size)}$timeTaken]["+name+"] " + msg )
  }
 <commit_msg>Cleanups for logger.<commit_after>package cbt

import java.time._

/**
 * This represents a logger with namespaces that can  be enabled or disabled as needed. The
 * namespaces are defined using {{enabledLoggers}}. Possible values are defined in the subobject
 * "names".
 *
 * We can replace this with something more sophisticated eventually.
 */
case class Logger(enabledLoggers: Set[String]) {
  def this(enabledLoggers: Option[String]) = this( enabledLoggers.toVector.flatMap( _.split(",") ).toSet )

  val start = LocalTime.now()

  def log(name: String, msg: => String) = {
    val timeTaken = (Duration.between(start, LocalTime.now()).toMillis.toDouble / 1000).toString
    System.err.println( s"[${" "*(6-timeTaken.size)}$timeTaken][$name] $msg" )
  }

{'fraction_non_alphanumeric': 0.14831130690161526, 'fraction_numerical': 0.007342143906020558, 'mean_word_length': 4.702928870292887, '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': '5131913', 'n_tokens_mistral': 427, 'n_tokens_neox': 415, 'n_words': 114}