A peer-to-peer stack for code collaboration
daemon: Improved logging
Thomas Scholtes2aea891223b7
diff --git a/exe/Daemon.hs b/exe/Daemon.hsindex b38ea0c..479caee 100644--- a/exe/Daemon.hs+++ b/exe/Daemon.hs@@ -158,7 +158,7 @@ query id (Api.QueryRequest v) = docase fst <$> runIdentity $ runLang (machineState m) $ eval v ofLeft err -> throwError $ MachineError id (InvalidInput err)Right rv -> do- logInfo Normal "Query success:" [("result", renderCompactPretty rv)]+ logInfo Normal "Handled query" [("machine-id", getMachineId id)]pure (Api.QueryResponse rv)-- | Write a new expression to an IPFS machine.@@ -182,6 +182,9 @@ send id (Api.SendRequest expressions) = dorequestInput (machineSubscription m)Just (Cached Machine{ machineMode = Reader, ..}) -> requestInput machineSubscriptionJust (Cached Machine{ machineMode = Writer }) -> do+ logInfo Normal "Applying input"+ [ ("machine-id", getMachineId id)+ ]results <- writeInputs id expressions Nothingpure Api.SendResponse{..}where