Add very basic logging to client
This commit is contained in:
parent
92f4804b40
commit
29e19ec1b2
1 changed files with 5 additions and 0 deletions
|
|
@ -213,11 +213,16 @@ runCorrectClient opts app
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
opts <- execParser clientOptionsParserInfo
|
opts <- execParser clientOptionsParserInfo
|
||||||
|
putStrLn "Connecting to server"
|
||||||
runCorrectClient opts $ \conn -> do
|
runCorrectClient opts $ \conn -> do
|
||||||
|
putStrLn "Performing initialization ritual"
|
||||||
node <- performInitialContact conn
|
node <- performInitialContact conn
|
||||||
chan <- newBChan 100
|
chan <- newBChan 100
|
||||||
let appState = newClientState chan node conn
|
let appState = newClientState chan node conn
|
||||||
|
putStrLn "Starting WS thread"
|
||||||
withThread (receiveUpdates chan node conn) $ do
|
withThread (receiveUpdates chan node conn) $ do
|
||||||
|
putStrLn "Starting UI"
|
||||||
let vtyBuilder = Vty.mkVty Vty.defaultConfig
|
let vtyBuilder = Vty.mkVty Vty.defaultConfig
|
||||||
initialVty <- vtyBuilder
|
initialVty <- vtyBuilder
|
||||||
void $ customMain initialVty vtyBuilder (Just chan) clientApp appState
|
void $ customMain initialVty vtyBuilder (Just chan) clientApp appState
|
||||||
|
putStrLn "Connection closed"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue