Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const (
// DefaultTimeFormat is the default format for any [time.Time] logged.
DefaultTimeFormat = "2006-01-02T15:04:05,000Z07:00"
DefaultTimeFormat = "2006-01-02T15:04:05,999Z07:00"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestHandler(t *testing.T) {
slog.Int("int", -123_456),
slog.Int64("int64", 42),
slog.String("string", "a string"),
slog.Time("time", time.Date(2000, 1, 2, 3, 4, 5, 6, time.UTC)),
slog.Time("time", time.Date(2000, 1, 2, 3, 4, 5, 6, time.UTC).Add(123_456*time.Microsecond)),
slog.Uint64("uint64", 123456),
},
Patterns: []string{
Expand All @@ -57,7 +57,7 @@ func TestHandler(t *testing.T) {
`\sint=-123,456\b`,
`\sline=\d+\b\b`,
`\sstring=a string\b`,
`\stime=2000-01-02T03:04:05,000Z\b`,
`\stime=2000-01-02T03:04:05,123Z\b`,
`\suint64=123,456\b`,
},
},
Expand Down
Loading