Skip to content

Commit

Permalink
Trace-dispatcher: Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jutaro authored and deepfire committed Nov 25, 2021
1 parent be302f2 commit 3d55de1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions trace-dispatcher/src/Cardano/Logging/Formatter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,13 @@ formatContextMachine hostname application LoggingContext {..} obj = do
let severity = (pack . show) (fromMaybe Info lcSeverity)
tid = fromMaybe ((pack . show) thid)
((stripPrefix "ThreadId " . pack . show) thid)
ns = application : lcNamespace
ns = fromString hostname
<> singleton ':'
<> mconcat (intersperse (singleton '.')
(map fromText (application : lcNamespace)))
ts = pack $ formatTime defaultTimeLocale "%F %H:%M:%S%4Q" time
pure $ AE.pairs $ "at" .= ts
<> "ns" .= ns
<> "ns" .= toStrict (toLazyText ns)
<> "message" .= obj
<> "sev" .= severity
<> "thread" .= tid
Expand Down
2 changes: 0 additions & 2 deletions trace-dispatcher/src/Cardano/Logging/Tracer/Forward.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Cardano.Logging.Tracer.Forward
Expand Down

0 comments on commit 3d55de1

Please sign in to comment.