<commit_before>package settings

import (
	"io"
	"log"
	"os"
	//"github.com/vaughan0/go-ini"
)

func SetLog() (retlog *log.Logger, logfile *os.File) {

	logfile, err := os.OpenFile("event.log", os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644) //file for putting errors into

	if err != nil {
		panic(err)
	}

	retlog = log.New(io.MultiWriter(logfile, os.Stderr), "Errors at ", log.LstdFlags) //Setting stuff for our logging: both errors and events.

	log.SetPrefix("Happens at ")
	log.SetFlags(log.LstdFlags)
	log.SetOutput(io.MultiWriter(logfile, os.Stdout)) //we write in file and stdout
	log.Println("Program start")

	return
}

func WriteConfig() {

}<commit_msg>ability to write default configuration if something goes added, not used yet<commit_after>package settings

import (
	"fmt"
	"io"
	"log"
	"os"
	//"github.com/vaughan0/go-ini"
)

func SetLog() (retlog *log.Logger, logfile *os.File) {

	logfile, err := os.OpenFile("event.log", os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644) //file for putting errors into

	if err != nil {
		panic(err)
	}

	retlog = log.New(io.MultiWriter(logfile, os.Stderr), "Errors at ", log.LstdFlags) //Setting stuff for our logging: both errors and events.

	log.SetPrefix("Happens at ")
	log.SetFlags(log.LstdFlags)
	log.SetOutput(io.MultiWriter(logfile, os.Stdout)) //we write in file and stdout
	log.Println("Program start")

	return
}

func writeConfigDefault() {
	config, err := os.OpenFile("config.ini", os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
	defer config.Close()
	if err != nil {
		panic(err)
	}
	_, err = fmt.Fprint(config, "[main] \nkey =\nqueue_depth =\ndowndir =")

	if err != nil {
		panic(err)
	}
}
{'fraction_non_alphanumeric': 0.15206812652068127, 'fraction_numerical': 0.00851581508515815, 'mean_word_length': 4.205696202531645, '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': '1508529', 'n_tokens_mistral': 656, 'n_tokens_neox': 628, 'n_words': 149}