Skip to content

Commit

Permalink
feat(log): change the date format
Browse files Browse the repository at this point in the history
Uses RFC3339 with milliseconds and without timezone
  • Loading branch information
torives committed Mar 28, 2024
1 parent 060026f commit 8af46c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/cartesi-rollups-node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ func main() {

// setup log
opts := &tint.Options{
Level: config.LogLevel,
AddSource: config.LogLevel == slog.LevelDebug,
NoColor: !config.LogPretty || !isatty.IsTerminal(os.Stdout.Fd()),
Level: config.LogLevel,
AddSource: config.LogLevel == slog.LevelDebug,
NoColor: !config.LogPretty || !isatty.IsTerminal(os.Stdout.Fd()),
TimeFormat: "2006-01-02T15:04:05.000", // RFC3339 with milliseconds and without timezone
}
handler := tint.NewHandler(os.Stdout, opts)
logger := slog.New(handler)
Expand Down

0 comments on commit 8af46c9

Please sign in to comment.