<commit_before>package logmunch

import (
	"bytes"
	"fmt"
	"sort"
	"strconv"
	"strings"
	"time"

	"encoding/json"
	"github.com/kr/logfmt"
)

type LogLine struct {
	Time    time.Time
	RawLine []byte `json:"-"`
	Name    string
	Entries map[string]string
}

func NewLogLine(when time.Time, line string) LogLine {
	return LogLine{
		Time:    when,
		RawLine: []byte(line),
	}
}

func (l *LogLine) String() string {
	parts := make([]string, 2, len(l.Entries)+2)

	parts[0] = l.Time.Format(time.RFC3339)
	parts[1] = l.Name

	// Key-value pairs
	for key, value := range l.Entries {<commit_msg>Log output with more detailed timestamps.<commit_after>package logmunch

import (
	"bytes"
	"fmt"
	"sort"
	"strconv"
	"strings"
	"time"

	"encoding/json"
	"github.com/kr/logfmt"
)

type LogLine struct {
	Time    time.Time
	RawLine []byte `json:"-"`
	Name    string
	Entries map[string]string
}

func NewLogLine(when time.Time, line string) LogLine {
	return LogLine{
		Time:    when,
		RawLine: []byte(line),
	}
}

func (l *LogLine) String() string {
	parts := make([]string, 2, len(l.Entries)+2)

	parts[0] = l.Time.Format(time.RFC3339Nano)
	parts[1] = l.Name

	// Key-value pairs
	for key, value := range l.Entries {
{'fraction_non_alphanumeric': 0.1536544850498339, 'fraction_numerical': 0.013289036544850499, 'mean_word_length': 3.7628458498023716, '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': '1612748', 'n_tokens_mistral': 494, 'n_tokens_neox': 477, 'n_words': 115}