<commit_before>package log

import (
	"flag"
	"fmt"
	"log"
	"os"
	"runtime"
)

// Logger specific flags
var (
	debug = flag.Bool("debug", false, "allow for verbose logging (DEBUG env can be used as well)")
)

// Infof logs info messages in verbose mode
func Infof(format string, args ...interface{}) {
	if !*debug {
		return // only in debug mode
	}

	log.Printf(message("INFO", format), args...)
}

// Warningf logs an error that can be recovered from
func Warningf(format string, args ...interface{}) {
	log.Printf(message("WARNING", format), args...)
}

// Errorf logs an error that can't be recovered from and thus is fatal
func Errorf(format string, args ...interface{}) {
	log.Fatalf(message("ERROR", format), args...)<commit_msg>demote warning to verbose-mode<commit_after>package log

import (
	"flag"
	"fmt"
	"log"
	"os"
	"runtime"
)

// Logger specific flags
var (
	debug = flag.Bool("debug", false, "allow for verbose logging (DEBUG env can be used as well)")
)

// Infof logs info messages in verbose mode
func Infof(format string, args ...interface{}) {
	if !*debug {
		return // only in debug mode
	}

	log.Printf(message("INFO", format), args...)
}

// Warningf logs an error that can be recovered from
func Warningf(format string, args ...interface{}) {
	if !*debug {
		return // only in debug mode
	}

	log.Printf(message("WARNING", format), args...)
}

// Errorf logs an error that can't be recovered from and thus is fatal
func Errorf(format string, args ...interface{}) {
	log.Fatalf(message("ERROR", format), args...)
{'fraction_non_alphanumeric': 0.14629388816644995, 'fraction_numerical': 0.0, 'mean_word_length': 3.692073170731707, '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': '3571718', 'n_tokens_mistral': 490, 'n_tokens_neox': 478, 'n_words': 181}