Skip to content

Commit

Permalink
Fix compilation issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed May 1, 2024
1 parent bac8735 commit 03301c0
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions chronicles/log_output.nim
Original file line number Diff line number Diff line change
Expand Up @@ -465,22 +465,15 @@ proc getZoneString(a: DateTime): string =
proc getSecondsString(a: DateTime): string =
a.format("ss'.'fff")

template writeTs(record) =
template timestamp(record): string =
when record.timestamps == RfcTime:
let ct = getTime().local
append(record.output, getTimeString(ct), getSecondsString(ct),
getZoneString(ct))
let ct = now()
getTimeString(ct) & getSecondsString(ct) & getZoneString(ct)
else:
append(record.output, epochTimestamp())

# template timestamp(record): string =
# when record.timestamps == RfcTime:
# rfcTimestamp()
# else:
# epochTimestamp()
epochTimestamp()

# template writeTs(record) =
# append(record.output, timestamp(record))
template writeTs(record) =
append(record.output, timestamp(record))

template fgColor(record, color, brightness) =
when record.colors == AnsiColors:
Expand Down

0 comments on commit 03301c0

Please sign in to comment.