Skip to content

Commit

Permalink
give a more meaningful format name where willing to log a readable ut…
Browse files Browse the repository at this point in the history
…c time
  • Loading branch information
Ivansete-status committed Sep 9, 2024
1 parent dce186e commit 2d48d14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ Possible values are:

https://en.wikipedia.org/wiki/Unix_time

- `UnixTimeReadable`
- `RfcUtcTime`

Chronicles will use the UTC but in human-readable format specified in
RFC 3339: Date and Time on the Internet: Timestamps
Expand Down
2 changes: 1 addition & 1 deletion chronicles/log_output.nim
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ proc getFastDateTimeString(): string =
template timestamp(record): string =
when record.timestamps == RfcTime:
getFastDateTimeString()
elif record.timestamps == UnixTimeReadable:
elif record.timestamps == RfcUtcTime:
epochTimestampReadable()
else:
epochTimestamp()
Expand Down
2 changes: 1 addition & 1 deletion chronicles/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ proc sinkSpecsFromNode*(streamNode: NimNode): seq[SinkSpec] =
of "notimestamps": setTimestamps(NoTimestamps)
of "unixtime": setTimestamps(UnixTime)
of "rfctime": setTimestamps(RfcTime)
of "unixtimereadable": setTimestamps(UnixTimeReadable)
of "rfcutctime": setTimestamps(RfcUtcTime)
else: discard

let dst = logDestinationFromNode(dstSpec)
Expand Down

0 comments on commit 2d48d14

Please sign in to comment.