<commit_before>package logger

import (
	"fmt"
	"os"
	"path/filepath"
	"strconv"

	"github.com/cenkalti/log"
)

var DefaultLogHandler log.Handler

func SetLogLevel(l log.Level) { DefaultLogHandler.SetLevel(l) }

func init() {
	h := log.NewWriterHandler(os.Stderr)
	h.SetFormatter(logFormatter{})
	DefaultLogHandler = h
}

type Logger log.Logger

func New(name string) Logger {
	logger := log.NewLogger(name)
	logger.SetLevel(log.DEBUG) // forward all messages to handler
	logger.SetHandler(DefaultLogHandler)
	return logger
}
<commit_msg>colored log output<commit_after>package logger

import (
	"fmt"
	"os"
	"path/filepath"
	"strconv"

	"github.com/cenkalti/log"
)

var DefaultLogHandler log.Handler

func SetLogLevel(l log.Level) { DefaultLogHandler.SetLevel(l) }

func init() {
	h := log.NewFileHandler(os.Stderr)
	h.SetFormatter(logFormatter{})
	DefaultLogHandler = h
}

type Logger log.Logger

func New(name string) Logger {
	logger := log.NewLogger(name)
	logger.SetLevel(log.DEBUG) // forward all messages to handler
	logger.SetHandler(DefaultLogHandler)
	return logger
}

{'fraction_non_alphanumeric': 0.11677479147358666, 'fraction_numerical': 0.0, 'mean_word_length': 5.033519553072626, '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': '1327796', 'n_tokens_mistral': 383, 'n_tokens_neox': 380, 'n_words': 82}