Skip to content

Commit

Permalink
Log static metadata server urls when launched
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking committed Jun 23, 2020
1 parent 63efc79 commit c74ffb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/shelley/src/Cardano/Wallet/Shelley/Launch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ withStakePool tr baseDir idx params action =
bracketTracer' tr "withStakePool" $ do
createDirectory dir
withStaticServer dir $ \url -> do
traceWith tr $ MsgStartedStaticServer dir url
(cfg, opPub, tx) <- setupStakePoolData tr dir name params url
withCardanoNodeProcess tr name cfg $ \_ -> do
submitTx tr name tx
Expand Down Expand Up @@ -1038,6 +1039,7 @@ withSystemTempDir tr name action = do
data ClusterLog
= MsgCartouche
| MsgLauncher String LauncherLog
| MsgStartedStaticServer String FilePath
| MsgTempNoCleanup FilePath
| MsgBracket BracketLog
| MsgCLIStatus String ExitCode String String
Expand All @@ -1055,6 +1057,9 @@ instance ToText ClusterLog where
MsgCartouche -> cartouche
MsgLauncher name msg ->
T.pack name <> " " <> toText msg
MsgStartedStaticServer baseUrl fp ->
"Started a static server for " <> T.pack fp
<> " at " <> T.pack baseUrl
MsgTempNoCleanup dir ->
"NO_CLEANUP of temporary directory " <> T.pack dir
MsgBracket b -> toText b
Expand Down Expand Up @@ -1087,6 +1092,7 @@ instance HasSeverityAnnotation ClusterLog where
getSeverityAnnotation = \case
MsgCartouche -> Warning
MsgLauncher _ msg -> getSeverityAnnotation msg
MsgStartedStaticServer _ _ -> Info
MsgTempNoCleanup _ -> Notice
MsgBracket _ -> Debug
MsgCLIStatus _ ExitSuccess _ _-> Debug
Expand Down
4 changes: 2 additions & 2 deletions lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ import Control.Tracer
( Tracer, contramap, traceWith )
import Data.Generics.Internal.VL.Lens
( view )
import Data.List
( sortOn )
import Data.List.NonEmpty
( NonEmpty (..) )
import Data.Map
Expand All @@ -94,8 +96,6 @@ import Data.Ord
( Down (..) )
import Data.Quantity
( Percentage (..), Quantity (..) )
import Data.Sort
( sortOn )
import Data.Text.Class
( ToText (..) )
import Data.Word
Expand Down

0 comments on commit c74ffb7

Please sign in to comment.