<commit_before>package debug

import (
	"log"
	"net/http"
	"time"
)

type debugResponsewriter struct {
	http.ResponseWriter
	code int
}

func (d debugResponsewriter) WriteHeader(n int) {
	d.ResponseWriter.WriteHeader(n)
	d.code = n
}

func New(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		drw := debugResponsewriter{w, 0}
		start := time.Now()
		h.ServeHTTP(drw, r)
		log.Printf("%s - %s - %s - %s - %d - %s", time.Since(start).String(), r.RemoteAddr, r.Method, r.RequestURI, drw.code, r.UserAgent())
	})
}<commit_msg>WriteHeader should have a pointer receiver<commit_after>package debug

import (
	"log"
	"net/http"
	"time"
)

type debugResponsewriter struct {
	http.ResponseWriter
	code int
}

func (d *debugResponsewriter) WriteHeader(n int) {
	d.ResponseWriter.WriteHeader(n)
	d.code = n
}

func New(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		drw := &debugResponsewriter{w, 0}
		start := time.Now()
		h.ServeHTTP(drw, r)
		log.Printf("%s - %s - %s - %s - %d - %s", time.Since(start).String(), r.RemoteAddr, r.Method, r.RequestURI, drw.code, r.UserAgent())
	})
}
{'fraction_non_alphanumeric': 0.15838247683235046, 'fraction_numerical': 0.0016849199663016006, 'mean_word_length': 4.2105263157894735, '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': '2430891', 'n_tokens_mistral': 461, 'n_tokens_neox': 451, 'n_words': 101}