started logging (but it's a bit ugly)

This commit is contained in:
Dennis Frieberg 2020-10-06 13:03:36 +02:00
parent 04d9f063d4
commit 56e546f5dd
6 changed files with 55 additions and 15 deletions

View file

@ -8,9 +8,10 @@ import Network.Wai.Handler.WebSockets
import Network.Wai
import Network.HTTP.Types
import Control.Concurrent.MVar
import qualified Colog as Log
waiApplication :: MVar WSA.ServerState -> Application
waiApplication serverState = websocketsOr WS.defaultConnectionOptions (WSA.application serverState) clientServer
waiApplication :: Log.LogAction IO Log.Message ->MVar WSA.ServerState -> Application
waiApplication logAction serverState = websocketsOr WS.defaultConnectionOptions (WSA.application logAction serverState) clientServer
-- this should serve the webclient see Network.Wai.responseFile
clientServer :: Application