<commit_before>// Package log implements a small wrapper around the std lib log package.
// It implements log levels by prefixing the logs with [INFO], [DEBUG],
// [WARNING] or [ERROR].
// Debug logging is available and enabled if the *debug* plugin is used.
//
// log.Info("this is some logging"), will log on the Info level.
//
// log.Debug("this is debug output"), will log in the Debug level.
package log

import (
	"fmt"
	golog "log"
)

// D controls whether we should ouput debug logs. If true, we do.
var D bool

// logf calls log.Printf prefixed with level.
func logf(level, format string, v ...interface{}) {
	s := level + fmt.Sprintf(format, v...)
	golog.Print(s)
}

// log calls log.Print prefixed with level.
func log(level string, v ...interface{}) { s := level + fmt.Sprint(v...); golog.Print(s) }

// Debug is equivalent to log.Print(), but prefixed with "[DEBUG] ". It only outputs something
// if D is true.
func Debug(v ...interface{}) {
	if !D {
		return
	}
	log(debug, v...)
}

// Debugf is equivalent to log.Printf(), but prefixed with "[DEBUG] ". It only outputs something
// if D is true.
func Debugf(format string, v ...interface{}) {
	if !D {
		return
	}<commit_msg>Fix typo in comment (#1939)<commit_after>// Package log implements a small wrapper around the std lib log package.
// It implements log levels by prefixing the logs with [INFO], [DEBUG],
// [WARNING] or [ERROR].
// Debug logging is available and enabled if the *debug* plugin is used.
//
// log.Info("this is some logging"), will log on the Info level.
//
// log.Debug("this is debug output"), will log in the Debug level.
package log

import (
	"fmt"
	golog "log"
)

// D controls whether we should output debug logs. If true, we do.
var D bool

// logf calls log.Printf prefixed with level.
func logf(level, format string, v ...interface{}) {
	s := level + fmt.Sprintf(format, v...)
	golog.Print(s)
}

// log calls log.Print prefixed with level.
func log(level string, v ...interface{}) { s := level + fmt.Sprint(v...); golog.Print(s) }

// Debug is equivalent to log.Print(), but prefixed with "[DEBUG] ". It only outputs something
// if D is true.
func Debug(v ...interface{}) {
	if !D {
		return
	}
	log(debug, v...)
}

// Debugf is equivalent to log.Printf(), but prefixed with "[DEBUG] ". It only outputs something
// if D is true.
func Debugf(format string, v ...interface{}) {
	if !D {
		return
	}
{'fraction_non_alphanumeric': 0.14476428869420108, 'fraction_numerical': 0.001668752607425949, 'mean_word_length': 3.1416234887737478, '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': '6920937', 'n_tokens_mistral': 747, 'n_tokens_neox': 741, 'n_words': 328}