From bcda028720e16fa335b3b3ffc2ed3306603b00bc Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 4 Nov 2024 07:02:52 +0100 Subject: [PATCH] add more logging --- src-server/Server/Communication.hs | 2 +- src-server/Server/Communication/Receive.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src-server/Server/Communication.hs b/src-server/Server/Communication.hs index 15598e0..84ec84a 100644 --- a/src-server/Server/Communication.hs +++ b/src-server/Server/Communication.hs @@ -131,7 +131,7 @@ processRequests = do forever $ sendMessageQueue curLevel sockContainer clientQueue logPrintIO curLevel Verbose "enabled sender thread" pure t - print clientSock + logPrintIO curLevel Verbose $ show clientSock liftIO $ STM.atomically $ do slist <- STM.takeTMVar socketList STM.putTMVar diff --git a/src-server/Server/Communication/Receive.hs b/src-server/Server/Communication/Receive.hs index b1dede2..b9054aa 100644 --- a/src-server/Server/Communication/Receive.hs +++ b/src-server/Server/Communication/Receive.hs @@ -62,7 +62,7 @@ receiveMessage curLevel socketList queueList sockContainer queue = do then [] :: [B8.ByteString] else map B8.tail $ init $ B8.split '>' $ B8.fromStrict rawMsg logPrintIO curLevel Verbose $ "received messages: " <> show msgs - print msgs + logPrintIO curLevel Verbose $ show msgs mapM_ (\msg -> do let mJsonMsg = A.decode' msg