Add logging for new endpoints

This commit is contained in:
1computer1 2019-07-11 02:23:33 -04:00
parent 92cb8a6388
commit b9ae32c4c0

View file

@ -61,8 +61,11 @@ serverT = handleLanguages :<|> handleEval :<|> handleContainers :<|> handleClean
handleContainers :: MyriadT m [T.Text]
handleContainers = do
logInfoN $ mconcat ["GET /containers"]
containers <- asks containers >>= readIORef
pure . map cvs $ M.elems containers
handleCleanup :: MyriadT m [T.Text]
handleCleanup = map cvs <$> killAllContainersMaybe
handleCleanup = do
logInfoN $ mconcat ["POST /cleanup"]
map cvs <$> killAllContainersMaybe