<commit_before>package handler

import (
	"fmt"
	"net/http"
	"runtime/debug"
	"time"
)

var PanicDateFormat = "Jan 2, 2006 at 3:04pm (MST)"

type PanicLogger interface {
	Print(v ...interface{})
}

// Panic returns a handler that invokes the passed handler h, catching any
// panics. If one occurs, an HTTP 500 response is produced. If the logger l is
// not nil, it will be used to print out a detailed message, including the
// timestamp and stack trace. If showStack is true, the detailed message is<commit_msg>Add a doc for the PanicLogger<commit_after>package handler

import (
	"fmt"
	"net/http"
	"runtime/debug"
	"time"
)

var PanicDateFormat = "Jan 2, 2006 at 3:04pm (MST)"

// PanicLogger is used to print out detailed messages when a panic occurs.
type PanicLogger interface {
	Print(v ...interface{})
}

// Panic returns a handler that invokes the passed handler h, catching any
// panics. If one occurs, an HTTP 500 response is produced. If the logger l is
// not nil, it will be used to print out a detailed message, including the
// timestamp and stack trace. If showStack is true, the detailed message is
{'fraction_non_alphanumeric': 0.08668453976764968, 'fraction_numerical': 0.01966041108132261, 'mean_word_length': 3.786324786324786, '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': '6354162', 'n_tokens_mistral': 353, 'n_tokens_neox': 332, 'n_words': 162}