generated from alex/base-template
report: Deno std logging timestamp options #4
No reviewers
Labels
No labels
dependencies
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
alex/irc-greeter-bot!4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pi/issue3-1783973956547"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Report: Timestamp options with Deno std logging
Investigates what
@std/logprovides for timestamped logging, as requested in #3.Key findings
@std/logcaptures a timestamp automatically — everyLogRecordhas adatetime: Datefield set at log-call time."INFO Hello, world!") ignores the timestamp entirely. The only built-in formatter that includes it isjsonFormatter, which emitsdatetimeas epoch milliseconds.formatterfunction toConsoleHandler/FileHandler. The report documents 5 approaches (ISO 8601, custom local format, locale string, JSON, JSON+ISO).Recommendation
If we adopt
@std/log, use a custom formatter withr.datetime.toISOString()for console output — it's UTC, unambiguous, and trivially parseable. The migration is mechanical: onesetup()call at program start, then swapconsole.*→logger.*.Full details in
reports/0003-deno-std-logging-timestamps.md.Closes #3
Pull request closed