Add some logging
This commit is contained in:
parent
1e318817a4
commit
69aa82837c
|
@ -1,6 +1,6 @@
|
|||
cabal-version: 1.12
|
||||
|
||||
-- This file has been generated from package.yaml by hpack version 0.35.0.
|
||||
-- This file has been generated from package.yaml by hpack version 0.35.2.
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
|
||||
|
@ -65,6 +65,7 @@ library
|
|||
, time
|
||||
, uuid
|
||||
, wai
|
||||
, wai-extra
|
||||
, warp
|
||||
, websockets
|
||||
default-language: Haskell2010
|
||||
|
@ -91,6 +92,7 @@ executable jitsi-rooms-exe
|
|||
, time
|
||||
, uuid
|
||||
, wai
|
||||
, wai-extra
|
||||
, warp
|
||||
, websockets
|
||||
default-language: Haskell2010
|
||||
|
|
|
@ -33,6 +33,7 @@ dependencies:
|
|||
- lifted-base
|
||||
- mtl
|
||||
- time
|
||||
- wai-extra
|
||||
|
||||
ghc-options:
|
||||
- -Wall
|
||||
|
|
|
@ -44,7 +44,7 @@ roomDataHandler ::
|
|||
m ResponseReceived
|
||||
roomDataHandler = do
|
||||
newRoomData <- parseBodyOrBadRequest
|
||||
liftIO $ putStrLn "Got triggered form prosody"
|
||||
liftIO $ putStrLn "Got triggered from prosody"
|
||||
whenM (roomStateDiffers newRoomData) $ do
|
||||
setRoomDataState newRoomData
|
||||
broadcastUserData
|
||||
|
|
|
@ -15,6 +15,7 @@ import Control.Monad.Except
|
|||
import Network.HTTP.Types
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp (run)
|
||||
import Network.Wai.Middleware.RequestLogger (logStdoutDev)
|
||||
import RoomDataHandler (roomDataHandler)
|
||||
import State.ConnectedClientsState
|
||||
( MonadConnectedClientsRead (..),
|
||||
|
@ -165,5 +166,5 @@ runWebServer ::
|
|||
m ()
|
||||
runWebServer = do
|
||||
putStrLn "http://localhost:8081/"
|
||||
runWebApp >>= liftIO . run 8081
|
||||
runWebApp >>= liftIO . (run 8081 . logStdoutDev)
|
||||
return ()
|
||||
|
|
Loading…
Reference in a new issue