<commit_before>package main

import (
  logging "github.com/op/go-logging"
)

// globally available server log
var serverLog *logger = nil

const (
  logFormat = "%{color}%{level} %{module} %{shortfile}%{color:reset} %{message}"
)

// simple wrapper around the go-logging library that allows us to easily create child loggers
type logger struct {
  logging.Logger
  level int
}

// get a new server logger
func NewServerLogger(logLevel int, logFormat string) *logger {
  logger := &logger{*logging.MustGetLogger("server"), logLevel}

  logging.SetFormatter(logging.MustStringFormatter(logFormat))

  logging.SetLevel(logging.Level(logLevel), "server")
  return logger
}

// get a child logger
func (sl logger) Child(name string) (*logger, error) {
  libLogger, err := logging.GetLogger(name)
  if err != nil {<commit_msg>a todo<commit_after>package main

import (
  logging "github.com/op/go-logging"
)

// globally available server log
var serverLog *logger = nil

const (
  logFormat = "%{color}%{level} %{module} %{shortfile}%{color:reset} %{message}"
)

// simple wrapper around the go-logging library that allows us to easily create child loggers
// TODO: support filesystem logging
type logger struct {
  logging.Logger
  level int
}

// get a new server logger
func NewServerLogger(logLevel int, logFormat string) *logger {
  logger := &logger{*logging.MustGetLogger("server"), logLevel}

  logging.SetFormatter(logging.MustStringFormatter(logFormat))

  logging.SetLevel(logging.Level(logLevel), "server")
  return logger
}

// get a child logger
func (sl logger) Child(name string) (*logger, error) {
  libLogger, err := logging.GetLogger(name)
  if err != nil {
{'fraction_non_alphanumeric': 0.12148414123279473, 'fraction_numerical': 0.0, 'mean_word_length': 4.745704467353952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '990300', 'n_tokens_mistral': 510, 'n_tokens_neox': 492, 'n_words': 155}