<commit_before>package logger

import (
	"fmt"
	"os"
	"path"

	"github.com/bugsnag/bugsnag-go"
	"github.com/juju/loggo"
	"github.com/wolfeidau/loggo-syslog"
)

// Logger wrapper for the internal logger with some extra helpers
type Logger struct {
	loggo.Logger
}

func init() {
	var level loggo.Level
	if os.Getenv("DEBUG") != "" {
		// if the magic debug variable exists...
		level = loggo.DEBUG
	} else {
		level = loggo.INFO
	}
	loggo.GetLogger("").SetLogLevel(level)
	if level != loggo.INFO {<commit_msg>If we are not using DEBUG then kill stderr ect as they are not required in production.<commit_after>package logger

import (
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"path"

	"github.com/bugsnag/bugsnag-go"
	"github.com/juju/loggo"
	"github.com/wolfeidau/loggo-syslog"
)

// Logger wrapper for the internal logger with some extra helpers
type Logger struct {
	loggo.Logger
}

func init() {
	var level loggo.Level
	if os.Getenv("DEBUG") != "" {
		// if the magic debug variable exists...
		level = loggo.DEBUG
	} else {
		// set the default level
		level = loggo.INFO

		// kill stderr
		log.SetOutput(ioutil.Discard)

		// remove the default writer
		loggo.RemoveWriter("default")
	}
	loggo.GetLogger("").SetLogLevel(level)
	if level != loggo.INFO {
{'fraction_non_alphanumeric': 0.1304, 'fraction_numerical': 0.0, 'mean_word_length': 3.4838709677419355, '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': '4578107', 'n_tokens_mistral': 480, 'n_tokens_neox': 461, 'n_words': 120}