Add very basic logging to client

This commit is contained in:
Joscha 2020-02-11 11:38:28 +00:00
parent 92f4804b40
commit 29e19ec1b2

View file

@ -213,11 +213,16 @@ runCorrectClient opts app
main :: IO ()
main = do
opts <- execParser clientOptionsParserInfo
putStrLn "Connecting to server"
runCorrectClient opts $ \conn -> do
putStrLn "Performing initialization ritual"
node <- performInitialContact conn
chan <- newBChan 100
let appState = newClientState chan node conn
putStrLn "Starting WS thread"
withThread (receiveUpdates chan node conn) $ do
putStrLn "Starting UI"
let vtyBuilder = Vty.mkVty Vty.defaultConfig
initialVty <- vtyBuilder
void $ customMain initialVty vtyBuilder (Just chan) clientApp appState
putStrLn "Connection closed"