Skip to content

Commit

Permalink
Merge #3660
Browse files Browse the repository at this point in the history
3660: cardano-tracer: fix time format in JSON log. r=deepfire a=denisshevchenko

Add more human-friendly time format in JSON-logs.

Co-authored-by: Denis Shevchenko <denis.shevchenko@iohk.io>
  • Loading branch information
iohk-bors[bot] and Denis Shevchenko authored Feb 28, 2022
2 parents 548fbf5 + 6bb4d64 commit 6b215fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cardano-tracer/src/Cardano/Tracer/Handlers/Logs/File.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ traceObjectToJSON TraceObject{toMachine, toTimestamp, toNamespace, toHostname, t
. TE.decodeUtf8
. LBS.toStrict
. encodingToLazyByteString
. pairs $ "at" .= formatTime defaultTimeLocale "%FT%T%2Q%Z" toTimestamp
. pairs $ "at" .= formatTime defaultTimeLocale "%F %H:%M:%S%4QZ" toTimestamp
<> "ns" .= mkName toNamespace
<> "data" .= case decodeStrict' $ TE.encodeUtf8 msgForMachine of
Just (v :: Value) -> v
Expand Down

0 comments on commit 6b215fd

Please sign in to comment.