<commit_before>package main

import (
	"fmt"
	"io"
	"log"
	"os"
	"os/exec"
	"time"
)

func main() {
	var err error
	t := time.Now()
	sData := t.Format("20060102")

	logFile, err := os.OpenFile(fmt.Sprintf("logs/vacuumlog_%s.txt", sData), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
	if err != nil {
		log.Fatal(err)
	}
	defer logFile.Close()

	mw := io.MultiWriter(os.Stdout, logFile)

	log.SetOutput(mw)

	/*
		On Windows:

		 You must edit C:\Users\geo\AppData\Roaming\postgresql\pgpass.conf on Windows
		 (1 row for each database !):

		 #hostname:port:database:username:password

		 On Linux:

		 su - postgres      //this will land in the home directory set for postgres user
		 vi .pgpass         //enter all users entries
		 chmod 0600 .pgpass // change the ownership to 0600 to avoid errors

		 #hostname:port:database:username:password
	*/

	out, err := exec.Command("vacuumdb", "-avzwU", "postgres").Output()

	if err != nil {
		log.Fatal(err)
	}
	log.Println(string(out))

	log.Printf("*******************\nend vacuum\n")
}<commit_msg>catch all output<commit_after>package main

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"os"
	"os/exec"
	"time"
)

func main() {
	var err error
	t := time.Now()
	sData := t.Format("20060102")

	logFile, err := os.OpenFile(fmt.Sprintf("logs/vacuumlog_%s.txt", sData), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
	if err != nil {
		log.Fatal(err)
	}
	defer logFile.Close()

	mw := io.MultiWriter(os.Stdout, logFile)

	log.SetOutput(mw)

	/*
		On Windows:

		 You must edit C:\Users\geo\AppData\Roaming\postgresql\pgpass.conf on Windows
		 (1 row for each database !):

		 #hostname:port:database:username:password

		 On Linux:

		 su - postgres      //this will land in the home directory set for postgres user
		 vi .pgpass         //enter all users entries
		 chmod 0600 .pgpass // change the ownership to 0600 to avoid errors

		 #hostname:port:database:username:password
	*/

	var outb, errb bytes.Buffer

	cmd := exec.Command("vacuumdb", "-avzwU", "postgres")
	cmd.Stdout = &outb
	cmd.Stderr = &errb
	err = cmd.Run()
	if err != nil {
		log.Fatal(err)
	}

	log.Println(outb.String())
	log.Println("Error:", errb.String())

	log.Printf("*******************\nend vacuum\n")
}
{'fraction_non_alphanumeric': 0.1623699683401176, 'fraction_numerical': 0.018995929443690638, 'mean_word_length': 3.4686868686868686, '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': '6677472', 'n_tokens_mistral': 913, 'n_tokens_neox': 814, 'n_words': 200}