<commit_before>package log

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"os"
	"path"
	"path/filepath"
	"runtime"
	"strings"
	"time"
)

const c_STACK_BUFFER_SIZE int = 8192

// Number of frames to search up the stack for a function not in the log package.
// Used to find the function name of the entry point.
const c_NUM_STACK_FRAMES int = 5

// Format for stack info.
// The lengths of these two format strings should add up so that logs line up correctly.
// c_STACK_INFO_FMT takes three parameters: filename, line number, function name.
// c_NO_STACK_FMT takes one parameter: [Unidentified Location]
const c_STACK_INFO_FMT string = "%20.20s %03d %40.40s"
const c_NO_STACK_FMT string = "%-65s"

// Format for log level. ie. [FINE ]
const c_LOG_LEVEL_FMT string = "[%-5.5s]"

// Format for timestamps.
const c_TIMESTAMP_FMT string = "2006-01-02 15:04:05.000"

type Level struct {
	Name  string
	Level int
}

var (
	unspecified = Level{"NIL", 0} // Discard first value so 0 can be a placeholder.<commit_msg>Change line number in logs to be 4 digits<commit_after>package log

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"os"
	"path"
	"path/filepath"
	"runtime"
	"strings"
	"time"
)

const c_STACK_BUFFER_SIZE int = 8192

// Number of frames to search up the stack for a function not in the log package.
// Used to find the function name of the entry point.
const c_NUM_STACK_FRAMES int = 5

// Format for stack info.
// The lengths of these two format strings should add up so that logs line up correctly.
// c_STACK_INFO_FMT takes three parameters: filename, line number, function name.
// c_NO_STACK_FMT takes one parameter: [Unidentified Location]
const c_STACK_INFO_FMT string = "%20.20s %04d %40.40s"
const c_NO_STACK_FMT string = "%-66s"

// Format for log level. ie. [FINE ]
const c_LOG_LEVEL_FMT string = "[%-5.5s]"

// Format for timestamps.
const c_TIMESTAMP_FMT string = "2006-01-02 15:04:05.000"

type Level struct {
	Name  string
	Level int
}

var (
	unspecified = Level{"NIL", 0} // Discard first value so 0 can be a placeholder.
{'fraction_non_alphanumeric': 0.09940944881889764, 'fraction_numerical': 0.03789370078740158, 'mean_word_length': 3.7611241217798597, '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': '7673701', 'n_tokens_mistral': 770, 'n_tokens_neox': 725, 'n_words': 267}